upgraded mongoose and added a 'close' handler

so that the user can be notified if a connection has been closed prematurely
use the http_close_handler added to mongoose