Change loglevel wrapper to use a single anonymous function

This allows for more custom integration, enabling a user
to define `this` by wrapping the loglevel code in a function
and invoking it with apply(customContext). Previously,
`this` would be null if invoked with apply.

Fixes #50