blackbox: extract logger class from ui wrapper
This moves most functions to new blackboxlogger class. The ui wrapper will be removed later.