Add extra assert() statements trying to catch a Mem object in an inconsistent
state.
Factor the Mem invariant checker into a separate procedure (rather than a
macro) so that it can be more easily extended.
Change the MEM_Dyn flag so that it means that Mem.xDel exists and must be
used to free the string or blob.  Add tighter invariant checks on Mem.
Change the MEM_Dyn flag so that it means that Mem.xDel exists and must 
be used to free the string or blob. Add tighter invariant checks on Mem.