Added clan applications

This involved a massive amount of both changes and additions; changes
because no longer was the system simply being exposed to users who were
more or less forced to use the system (thus things like the log in
required page needed to be a lot nicer).

The application system itself was also quite an undertaking because I
wanted custom questions, but I wasn't happy with any of the frameworks I
found for doing so, thus I wrote my own (quite bad) one. It works
though.
Fixed upkeep tasks
Added date range to battles search