Added composer for dependency management, and added Zend Framework 2 - Zend Db Module as a dependency. Added the composer autoloader to the autoload chain by requiring it in gateway_base.
Adding zend stlib as a dependency to Composer.
Adding new interface and initializer for DbAdapter - a module from Zend Framework 2. ModelBase is now aware of ZF2 DbAdapter, and Image Model utilises it for a single query (phased implementation - all queries to be replaced with ZF2-style ones shortly)
Added missing namespace declaration to json gateway
Made Upload component be ImageModelAware, removing dependency on DependencyContainer.
Replacing remaining database queries with Zend Framework 2 Db/Sql object ones.