modularize application locking; release locks in the AppLock destructor to try catching some corner cases; tested with non-mobilized db
Merge branch '4_7_x' of https://github.com/xtuple/qt-client into i24469_xtlock

Conflicts:
	common/common.pro
Merge pull request #466 from gilmoskowitz/i24469_xtlock

issue #24469 - try to address xt.lock problems in qt-client