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
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
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
Merge pull request #3835 from BanzaiMan/dev/hasari/c18

Merged by openshift-bot