Fix "random" order of auto-generated forward declarations

astAddForwardDeclsForUndeclaredTagIds() prepended them to the AST based on
the order of items in the hashtb. This meant their order was completely
"random", depending on the hash values and amount of the found tag ids.

When working on huge bindings (e.g. entire GTK+ with dependencies), the
hash table order could be different because of different dummyids, even
though the input code was the same.
* dummyids are currently generated based on a global/static counter
* so they're different for every API version
* this causes different hash values and thus different order of hash items
* which meant that the order of forward declarations could be different
  for every version
* which, after merging, resulted in very weird code, not technically wrong,
  but ugly and hard to understand