db, comparison, ranges: store ranges and comparison instead only one or other
In the old format something could be stored as a range:
s32min-10
Or if we couldn't determine any range then it might be stored as a
comparison:
s32min-[<p0]
But now we want to store the range and the additional limitter:
s32min-10[<p0]
So if param 0 is 8 then the return range is s32min-7. If param 0 is 100
then the return range is s32min-10.
Along with that I have cleaned up the str_to_comparison_arg() to not set
and endp pointer. That wasn't used outside smatch_ranges. The other
places only care about the parameter and the comparison.
After I updated smatch_db.c to the new format then there weren't any
callers to range_comparison_to_param() so I have removed that function.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>