Refactored setLogLevel() to avoid recursive call.

Also added 'currentLevel' variable to store current log level.
Refactored setLogLevel() to setup logger functions in a simpler fashion.

The realMethod() helper now handles the no-console-available case, so
there is no longer any need for a factory function to create logger
functions.
Merge pull request #54 from cederberg/refactor_setloglevel

Refactor setLogLevel()