Make _flush aware of _putthread ongoing tasks
Make sure _flush() is aware if _putthread() is idle or working on a
Relying on page_put_queue.qsize() > 0 only, as a condition to keep the while
loop alive is not safe as the last item in the queue can be fetched by
async_manager() before page_put_queue.qsize() is checked and then found empty.
In this case _flush() returns before all pending requests are served.
A new Queue is introduced as a form of synchronisation between
MainThread in _flush() and asyc_manager(), signalling when async_manager
is actually working and not idle waiting for a request.