Fix realloc parameter error checking to allow NULL pointers, and make realloc state recording use a memmove.
Fix realloc parameter error checking to allow NULL pointers, and make realloc state recording use a memmove.

mheinsen/seec,seec-team/seec,mheinsen/seec,seec-team/seec,mheinsen/seec,seec-team/seec,mheinsen/seec,seec-team/seec,seec-team/seec,mheinsen/seec