Detect SSL connection whether or not behind a proxy

closes #1836
- adding server.enable('trust proxy') to let connect framework do the work
  of detecting X-Forwarded-Proto header
- replacing explicit checking for the X-Forwarded-Proto header with just
  'req.secure' boolean check
Merge pull request #2047 from gimelfarb/fix-1836-ssl-detection
Fix error page resources loading when forceAdminSSL is true

closes #1837
- moved admin theme static resource service above 'checkSSL', otherwise
  when forceAdminSSL is true it will try to redirect them to HTTPS, and
  error pages will be unstyled
Merge pull request #2048 from gimelfarb/fix-1837-errpages-when-force-admin-ssl