add history queue and history workers

should keep db logging on background threads
and under control