Fix amx_Allot() returning success on insufficient heap

There is a bug in amx_Allot() where it returns success even though
there's not enough space on the heap:

if (amx->stk - amx->hea - cells*sizeof(cell) < STKMARGIN)
   return AMX_ERR_MEMORY;

The expression on the right side of the comparison is converted
to an unsigned type (because result of sizeof is of type size_t).
and in fact never results in a negative value.
Add a few macros to reduce code duplication
Fix log_error_code() crash
Fix heap addresss/size miscalculations
Make amx_Allot() resize the heap as needed
Fix AMX data pointers not being updated on heap resize
Fix stack not being moved on heap resize
Fix heap contents getting cleared on resize
Rename fakeamx's heap-related functions

Prefix them with "heap_" so it's obvious that the "push", "pop", etc
methods deal with the heap and not the stack.