Copy PHP extensions INI files to the cartridge code for maintainability

- Copy RHEL PHP 5.3 RPM /etc/php.d/*.ini files
- Copy RHEL PHP 5.4 SCL /opt/rh/php54/root/etc/php.d/*.ini files
- Lock all the INI files by default (not editable in userspace)

Motivation:
- We want to be able to enable/disable PHP extensions in gears
- We want to be able to edit PHP extensions settings in gears
- We want consistency for all the INI files across all nodes.
  Currently, the INI files are marked %config(noreplace) in RPMs
  and may theoretically differ from node to node.

PHP_INI_SCAN_DIR (PHP/PECL extensions):
- Set PHP_INI_SCAN_DIR env var to scan customized INI files
  from ${OPENSHIFT_PHP_DIR}etc/php.d/ directory
  instead of the default system's scan dir (eg. /etc/php.d/)

https://trello.com/c/lbjDOA6S - origin_cartridge_20
https://trello.com/c/1VcpoZTf - origin_cartridge_140
https://trello.com/c/iDrhIUof - origin_cartridge_136
https://bugzilla.redhat.com/show_bug.cgi?id=1001400 - bug 1001400
Enable mcrypt for PHP 5.4

https://trello.com/c/iDrhIUof - origin_cartridge_136
PHP - Remove duplicated files on gears & Leverage use of usr/ shared dir

Changes in PHP gears:
- remove extra directory php/versions/ that was duplicated
  on every PHP gear without any reason

Changes in PHP cartridge source directory:
- move the php/versions/ directory into the shared usr/
  directory and simplify it's structure as follows:

└── usr
    ├── 5.3
    │   └── etc
    │       ├── php.d
    ├── 5.4
    │   └── etc
    │       ├── conf.d
    │       ├── php.d
    ├── shared
    │   └── etc
    │       ├── conf
    │       ├── conf.d
    │       ├── php.ini.erb
PHP APC configurable per gear size / env var

- APC is enabled by default
- Users can enable/disable APC by running
  `rhc env-set OPENSHIFT_PHP_APC_ENABLED=false --app <app>`
  and `rhc app-restart <app>` commands

APC shared memory size:
- Formula: GEAR_MEMORY/8
  - 64M on Small gears by default
  - 128M on Medium gears by default
  - 256M on Large gears by default
- Users can change the APC shared memory size by running
  `rhc env-set OPENSHIFT_PHP_APC_SHM_SIZE=128M --app <app>`
  and `rhc app-restart <app>` commands

New environment variables:
- $OPENSHIFT_PHP_APC_ENABLED=true/false
- $OPENSHIFT_PHP_APC_SHM_SIZE={64,128,256}M
PHP - Development/Production mode

- Expose new environment variable to choose application mode:
  APPLICATION_ENV=development/production (production by default)

- Users must restart their app for the PHP to pick-up the updated values!

Production environment:
- disables Xdebug (can be overriden by `OPENSHIFT_PHP_XDEBUG_ENABLED=true`)
- disables APC stats (for better performance)
- sets error_reporting level to `E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE`
- disables display_errors, display_startup_errors, track_errors, html_errors

Development environment:
- enables Xdebug (can be overriden by `OPENSHIFT_PHP_XDEBUG_ENABLED=false`)
- sets Xdebug max_nesting_level = 200
- enables APC stats
- sets error_reporting level to `E_ALL|E_STRICT`
- enables display_errors, display_startup_errors, track_errors, html_errors
Fix php file permissions cucumber tests
fix php upgrade
Merge pull request #5112 from VojtechVitek/php_fix_upgrade

Merged by openshift-bot
Merge pull request #5024 from VojtechVitek/php_extensions

Merged by openshift-bot
Fix formatting
Merge pull request #5113 from danmcp/master

Merged by openshift-bot
Enable PHP 5.4 xdebug

Bug 1082482 - https://bugzilla.redhat.com/show_bug.cgi?id=1082482
Fix PHP 5.4 apc.stat logic

Bug 1082554 - https://bugzilla.redhat.com/show_bug.cgi?id=1082554
Merge pull request #5115 from VojtechVitek/fix_php54_xdebug

Merged by openshift-bot
Merge pull request #5116 from VojtechVitek/php54_fix_apc.stat

Merged by openshift-bot
fix bad variable reference for version check
Bug 1081954 - Prevent killing non-existent haproxy process when force-stopped
Merge pull request #5117 from bparees/jbossews_upgrade

Merged by openshift-bot
Merge pull request #5118 from mfojtik/bugzilla/1081954

Merged by openshift-bot