Fix endpoint manifest entries in database cartridges

Make the private IP/Port names consistent with the public endpoint
naming expectations and with the expectations of the configure scripts.
Merge pull request #1377 from ironcladlou/bugs/db_endpoint_manifests

Merged by openshift-bot
use correct sort syntax
Performance fixes around retrieving apps and domains
Merge pull request #1375 from danmcp/master

Merged by openshift-bot
Bug 868427: Fix tidy for v1 carts
Add request id to mco requests
Add index on domain_id
Merge pull request #1378 from ironcladlou/bz/868427

Merged by openshift-bot
Merge pull request #1380 from danmcp/master

Merged by openshift-bot
V2 WIP:

* Added application_repository.rb + tests
* Configure/deconfig WIP -- Tests having selinux issue running setup
* Add unit test for v2 model, minor cleanup
* Implement util cgroups methods
* Add comment for v2 destroy
* Mock cartridge WIP
* Fix private endpoint availability checks
WIP Cartridge Refactor

* Restore creating git directory
mock cart rpm changes
Use unversioned template for mock
rename mock template.git to template
WIP: mock cart cuke test
WIP: make jhonce happy