recurse, extra: introduce has_variable() and fix forever loop OOM crash
There was a loop in smatch_extra which was causing problems when you
assigned a variable like this:
foo = foo + bar;
I have stopped this by introducing the has_variable() function so you can
check if "foo + bar" has the foo variable. I have removed the checks for
is_simple_math() because those aren't needed at all.
The one thing to be aware of is that has_variable() is not totally complete
and it doesn't search very deeply. If it errors out then it returns -1.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>