Fix endpoint error when running keystone on apache

When running keystone in httpd, horizon could not generate the
right keystone endpoint url. Fixes this issue by retrieving the
whole path from the service_catalog or OPENSTACK_KEYSTONE_URL
and generating a new url.

Change-Id: Id8459947498127e47700d9f690d4ed4d5cadbba9
Closes-bug: #1295128
(cherry picked from commit 48a0d07e45bac04393978776c63b67cd7c71415d)
Merge "Fix endpoint error when running keystone on apache" into stable/icehouse