generic pool in jedis from https://github.com/xetorthio/jedis/blob/master/src/main/java/redis/clients/util/Pool.java