Remove redundant code from disable_logging

This also fixes a minor performance issue because the while loop was
only explicitly exited if logging was not already disabled even if the
buffer had been already found.
Restore default log level after OTR conversation

Fixes #56
Use bash, as `let` is not a POSIX construct

Also, one less line of source code :)
Merge pull request #72 from tribut/logging-reset-default

Reset logging to default if no explicit value was set