Fixed sorting of same day deployments of app

Fixed the sorting of application deployments that occur on the same day.
In addition to sorting by completed deployment date, the list is further
sorted by date created for the deployment. This will sort same day
deployments based on when the deployment was created.
Consolidate deployment query methods

Consolidated redundant methods used to query application deployments.
Fixed deployment environment app list

This fixes a problem where the latest application deployment and release
information displayed when viewing applications deployed to an
environment. This fix reuses an existing query to load the latest
deployment for a specific application and environment.
Fixed app list for system environment

This resolves an issue where the list of applications showing the latest
deployment to a system.