faster mysql reconnect
unglobalize some vars
serialize fetcher and worker threads

fetching callids depends on the workers finishing their processing and
removing the processed acc records, so we must wait to fetch more
callids until the workers are done