Improve search and 404 behaviour with aliases

This should fulfill the suggestions in #14. It ended up being fairly simple, most of the data was already prepared, just waiting to be used. The 404 page is placed in each folder, /gl4/404, /gl3/404 etc. e.g. Apache config is just:

```
  <Location "/gl4">
    ForceType text/html
    ErrorDocument 404 /gl4/404
  </Location>

  <Location "/gl3">
    ForceType text/html
    ErrorDocument 404 /gl3/404
  </Location>

  ... etc
```

You can see it running on my test server http://docsgl.baldurk.org/ (I only just set it up today so you might need to force the DNS to 50.115.121.236 in your hosts file, or wait a bit for the DNS to propagate).