slist: fix "stack not empty" errors
Adding the pre_merge_hooks caused some "stack not empty" messages, which
presumably means that flow analysis is broken.
1) Improve the debugging by making the "stack not empty" messages print the
function name where the bug happens.
2) In smatch_states then clean things up a bit and also fix a memory leak
I noticed while looking for this bug.
3) In pre merges then don't try to be clever, just use the big hammer
method of saving the entire state, faking a simple current state, and
then restoring all the state.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>