Fix memo signon and memo receive default flag names
mysql_insert_id doesn't return an id if one isnt generated, so
check that it really returns a value before using it.
Also fix memos to cleanup after themselves when deleted.