Add optional timelimit

I like this game but yesterday played a game that lasted almost half an hour, which was terrible. I implemented an optional time limit; if you set timelimit to a number, then the game ends after that many seconds, with an "out of time" banner.

(new PR because I accidentally added to my original PR, which wasn't against a branch.)