Extricate time functionality into time.php
Migrate PHP code to PDO (with exceptions and prepared statements)

- Change code to use PDO style.
- Replace individual input filtering with use of prepared statements.
- Make database handler throw exceptions, add exception handler,
  and remove obsolete error-checking code.
Make server choose player's initial colour when they join a game
Make lobby.js's fetches more portable between databases
Increase precision of lobby.js's join game error detection
Tweak formatting (minor)
Change config.php to use windows-style newlines

- Makes reading the error logs quicker on windows
  (as in, can just use notepad)
Change capitalisation for aesthetic purposes (minor)