move debug logging into libanki

we want to be able to log the initial automatic sync, which
happens before the debug logging was set up in ankiqt

also skip the flush, as it should eventually get written