Implements AR Deferrable runner type to handle active record connection and disconnection in multithreaded processes