Close db on failed connect so node can exit.

With mongod running on localhost:27017:
```
var MongoClient = require('mongodb').MongoClient;
MongoClient.connect('mongodb://localhost:27017', function (err, client) {
   if (err) console.error(err);
   else console.log('connect ok');
   if (client) client.close();
});

MongoClient.connect('mongodb://localhost:27018', function (err, client) {
   if (err) console.error(err);
   else console.log('connect ok');
   if (client) client.close();
});
```

Output is:
```
connect ok
[Error: failed to connect to [localhost:27018]]
```

...and the node process will not exit on its own.