Added minimal debugging support

Press Ctrl+Alt+D to enable some minimal debugging.  It will only measure
ticks and ms spent on certain methods at the moment but it may be useful
to track down what's taking long on some systems.