queries.pool: Iterate over connection.keys() in close method.
queries.pool: Iterate over connection.keys() in close method.

This commit alters pool.close() so that it iterates over
connection.keys() rather than connection. This is to address an issue
where the call to pool.remove() deletes from connections, which causes a
RuntimeError for deleting while iterating over the dictionary.

gmr/queries,gmr/queries