Make sure all apps use the trust proxy setting

Without this setting enabled the apps get the incorrect 'req.protocol'
and therefore generate http urls even when the connection has come in
over https.

The hosting-app, instance-app and dev-helpers all have the setting set
individually because they are top level express applications. Other
applications are created using the express-inherit module, so we just
inherit the setting from the parent application in that case.
Make sure API urls use the correct protocol

The API app is mounted inside another app, which in turn is mounted
inside a parent, so at the point the API is mounted the parent
doesn't have the trust proxy setting, so to fix the urls in the API
I've set some properties on the request object in the parent app,
which does correctly inherit the trust proxy setting.
Merge branch 'all-apps-should-trust-proxy'