Implemented a background cleanup task for idle connections.

Modified the mock RequestProcessor to not sleep in the request processing as that blocks the eventloop and hence produces unnecessary delays in the parallel executing tests.