fix #970, #12317: adjust dbpatch table; delete map values with triggers

Fixes http://trac.openmicroscopy.org.uk/ome/ticket/970 and http://trac.openmicroscopy.org.uk/ome/ticket/12317.
--no-rebase
--exclude until a breaking label is added

To test:
1. create a fresh DB
1. observe the contents of the `configuration` and `dbpatch` tables
1. start the server
1. see that a `DBEnumCheck` entry is added to both tables
1. check that the server is running okay
1. restart the server
1. see that both tables have nothing new from the restart
1. check that the server is running okay
1. import some images
1. see that we thus have some map property entries in the database, e.g., in the `uploadjob_versioninfo` table
1. delete some images
1. see that the corresponding property map entries are deleted.