Periodically close session and connection dhandles that are no longer

used. (#586)