Fix #2

This commit implements #2's AUTO_MERGE and AUTO_DELETE procedures, along
with tests for them
Change _EXISTS assertions to procedures

The equality assertions have to remain functions to permit type-based
overloading, but the existence assertions are now procedures to permit
them to be easily used in other stored procs (e.g. history and merge to
check for existence of referenced tables)