Tune postgres memory usage based on available mem

On standalone gears, use maximum available memory to set parameters.
Tune MySQL parameters via OPENSHIFT_GEAR_MEMORY_MB
Ensure Drupal gears can migrate

This is a redo of f9c1089, which addressed
https://bugzilla.redhat.com/show_bug.cgi?id=1008043 and
https://bugzilla.redhat.com/show_bug.cgi?id=1013673.
Guard against removing innoDB logs
Process postgresql.conf on each cartridge startup

Basically mimicing what MySQL cartridge does.
Difference in ERB template location is taken into account.
Bump up memory for standalone cartridges
Bump MyISAM memory parameters

Based loosely on
http://serverfault.com/questions/354872/best-my-cnf-configuration-for-a-8gb-mysql-server-with-myisam-use-only
Fix extended tests
Allow gear_size parameter during application creation and cartridge addition.
Double up memory limits for embedded MySQL cart
Use oo-erb instead of erb
Use deployment metadata for build related marker lookups
Bug 1019980 - SSH keys not distributed on membership changes
Set the PassengerMaxPoolSize according to the current gear memory in Ruby cart
Update MaxClient and ServerLimit according to the gear memory in PHP
Merge pull request #3883 from pravisankar/dev/ravi/card22

Merged by openshift-bot
Merge pull request #3905 from ironcladlou/dev/build-deploy-metadata

Merged by openshift-bot
Merge pull request #3907 from smarterclayton/bug_1019980_keys_not_distributed

Merged by openshift-bot
Set the 'stack-size' for WSGI python application based on the gear size
Updated Cartridge-Version in all affected cart