Navigation rewrite to support running under nginx.

HotCRP now works with a single PHP entry point, namely index.php.
Requires extensive changes.