Bug 1002685 - Downcase domain names when fetching applications by domain

The domain_id lookup for applications scoped to a domain was not properly lowercasing the namespace
Merge pull request #3519 from smarterclayton/bug_1002685_downcase_domain_names

Merged by openshift-bot