ctdb-logging: Add APIs to convert debug_level to and from integer