issue #24559 - locking with pg 9.3 and web vs qt clients

This set of commits does several things:
- fix our lock/unlock code to handle changes in the system catalogs for Postgres 9.2
- temporarily short-circuit application locks so the desktop client uses advisory locks while the web client uses the xt.lock table
- make loading a different version of Postgres easier
- address #1846 (install of npm vs npm modules) (required to get a functional vm)
- possibly fix the "missing plv8" error (required to get a functional db)

tested with Postgres 9.1 and 9.3 using a combination of qt and web clients
The primary reason not to delete these files is assurance that we get the expected behavior in an upgraded database. We've repeatedly had problems in the past with functions being removed from the source tree but not from databases during upgrades.