Moved the FPS-drawing code to main

By moving the code to main.lua, all of the game windows will have the
FPS drawn on them if the option is enabled, without having to add the
code to each individual window.
Updated code style
Merge pull request #1273 from Protuhj/fps-menus

Moved the FPS-drawing code to main.lua