Add support for HTTP_X_FORWARDED_PROTO

Add logic to detect when a proxy is being used in front of the
application and correct internal state accordingly so that canonical
URLs generated by the Slim framework will use the proper protocol and
port. An alternate way to correct this behavior would be to change all
of the link generation logic to use protocol relative URLs but that
would require deeper changes to the framework being used than this small
environment change shim.

Bug: 58041
Change-Id: I68731fc3a5285806360ef08fe5f4e60121c3cf3e