Extended environment variable runtime configuration control

Earlier efforts added ORM caching by using the Tastypie caching mechanism. On the production website caching has been added using Nginx caching. This removes the need for the Tastypie caching mechanism on the production system, developers or people running their own version may want to use the caching so added environment variable control.

In production, the database Postgres is used, developers may want to use this so an environment variable has been added to control selection of this.

Unless otherwise stated, environment variables are on if they exist and contain a string value other than 0 or False, matching false is a case insensitive test.

Environment variables and what they do:
  * CCJ_PRODUCTION - indicates that software is running in production, which means Postgres is used as
                                     the database and debugging mode is turned off
  * USE_POSTGRES - indicates that the Postgres database is to be used, if not use the default one for the
                                  current mode
  * USE_INTERNAL_CACHE - indicates that the ORM caching mechanism is to be used, currently Tastypie's
                                             SimpleCache
  * CACHE_TTL - specifies how long, in minutes, internally cached values are to live. Default is 12 minutes.