Follow arguments in function pointer calls

We have already tracked function arguments in try_track_args(), but the
logic missed function pointers, which can also be called directly.
Add varscope_type: find the declaration of a type (or member)

This function provides another interface to the varscope database,
which allows searching for a specific type or type member.
Fix flatten_type for abstract type names

In a declaration, the type's dynstr is part of the declarator, and the
abstract type does not contain it. However, for a type_name element
(e.g. in sizeof() or typecasts), the resulting type covers the complete
expression. For example, in:

foo = (char *) bar;

the "char *" pointer type contains 3 dynstrs: "char", " " and "*". When
you try to flatten this type, you'll try to delete the pointer node,
but this fails, because there is still a reference to "char" from the
base type. This is in fact correct, because otherwise the resulting
flattened type would contain a dangling pointer to an already freed
dynstr.

Fix this by adjusting the abstract type's extents before deleting it.
Fix tracking of '*' dereference operator

We didn't check the difference between the binary '*' (multiply) operator
and the unary '*' (dereference) operator. Lots of indirection warnings
because of that...
Fix target arithmetics rules

The result of an addition or subtraction may not be a good candidate
for converting to a target type, e.g.:

void *buffer;
long x = ULONG(whatever);
long *ptr = buffer + x;

Even though "x" is converted to a target type, the "ptr" pointer should
stay host-specific.
Handle tracking of function arguments without a type specifier

Function arguments need not have a type specifier. In that case,
first_element() returns an invalid pointer, so we'd better use
another function and check the result before passing it to
subst_target_type().
track_expr: save indirection specifiers when dereferencing

The indirection stack is passed by reference, so if you pop some
values from it, they are not restored, but the calling function may
still hold a pointer to them.

To fix this with a minimum of code (and without breaking tail recursion
optimizations in most places), let's save the values which are popped,
and return them after a recursive call to track_expr().
target_facilitators: use variable tracking for the initial substitution

The variable tracking code is more robust than the find_assign() hack.
For example this code would confuse the old code, but works fine with
the new approach:

char *buf = GETBUF(ULONG(hdr));

The left side of this assignment would be mistakenly treated as a target
type, because the call to GETBUF() was not properly analyzed.
track_type: consider type_func as the return type

This is a special case, because parsed macros don't have any return
type. Instead of faking one in the parser, let's treat them specially
in the variable tracking code.
Rename ind_func -> ind_return

This is a more accurate name, because it expresses the relation
between the base type and the function type.

FWIW there are also other possible relations (argument of that function,
expressed with a positive number).
varscope_expr: handle array subscripts

Add code to handle the [] (array index) operator.
Add a MAXIND macro to specifiy the maximum indirection level

Give the arbitrary constant at least a name...
Put the indirection interpretation in its own function

Add ind_base_type() to get the base type of an indirect type.
is_target_arith: Improve the check

The old algorithm is quite naive and misses a lot of cases. Provide a
more complete way to check whether an expression is host-specific or
target-specific.
track_assign: handle array subscripts on the left-hand side

Subscripting an array is equivallent to dereferencing a pointer, so it
can be simply added to the existing condition.
Track even variables that were not modified

Even if the variable type itself was not modified, the variable should
still be marked as target-type and tracked.
Change the built-in definition of symbol_info

Use the same type as actual bfd has.
This change is merely cosmetic.
Do not modify types in the built-in file

Since target types are defined in defs.h, which gets parsed AFTER
the built-in file, the built-in file gets unparseable if we try to
use a target type there...