BUG: refs #0283. Released lock files at end and fixed core upgrades.
BUG: refs #0283. Released lock files at end and fixed core upgrades.

The db lock.dbtype.ini files were created at the beginning, but never
released, now at the end of processing they are released.  Also, there
was a bug where core upgrades were not run, now all core upgrades are
run after installing the core schema.

jcfr/Midas,mgrauer/qibench,mgrauer/qibench,mgrauer/qibench,jcfr/Midas,jcfr/Midas,jcfr/Midas,jcfr/Midas,mgrauer/qibench,jcfr/Midas,mgrauer/qibench,mgrauer/qibench,mgrauer/qibench