A generic object pool using Q promises