added ability to replace console

This push implements two functions allowing loglevel to replace window.console but also restore it if required. I have done a manual test and both functions worked correctly.

This is to add the feature requested here: #42