Add threaded operation

Make sqlite transport threadable