Named log levels via new loglevel class

Fixes #4.
Yes, it's for backward compatibility: By that, if someone hard-coded the numeric log level, the code still should work.