Introduce o_log_level_active()

This allows to abstract the logic of testing log levels.

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>
Remove unneeded include

Signed-off-by: Olivier Mehani <olivier.mehani@nicta.com.au>