Allow Gogs to run from a suburl behind a reverse proxy.

### Allow Gogs to run from a suburl behind a reverse proxy.
e.g. http://mydomain.com/gogs/

The suburl is taken from the **ROOT_URL** setting and applied to generated links and redirects.
So if ROOT_URL is set to http://mydomain.com/ everything works as it did before this change,
if ROOT_URL is set to http://mydomain.com/gogs/ the suburl setting (AppRootSubUrl) will 
be set to "/gogs" and used throughout the app to ensure correct links and urls.

nginx config example:

    location /gogs/ {
        proxy_pass http://localhost:3000/; # note the trailing slash
        include proxy_params;
    }

Known issues:
* Switching language redirects to /... instead of /suburl/... (macaron-contrib/i18n)
* Captcha renders wrong url to image, /captcha/x.png instead of /suburl/captcha/x.png (macaron-contrib/captcha)