ranges: don't allow so many inverted ranges
It turns out that we were getting a lot of ranges like 0-(-1). Part of
the problem was the nested struct issue fixed in
0ee267044792 ('type:
improve get_member_type_from_key()'). But also when we add a range we
should do it with add_range_type(). I moved that function around to
avoid the forward declaration.
If that fails, and we still get and inverted type then just use the whole
range at that point.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>