Avoid direct use of the console object when drawing tasks

Commit 5f5fde6 is the relevant one, the others are me reverting off a few of my fork's changes - it may be better to just cherry pick that commit or apply manually.

This adds quick methods to allow debugging to be 'always on' for browsers that support it. It would be fairly easy to add log level masks as well.