Close mongoose connection after search tests

This hopefully prevents errors like "Trying to open unclosed
connection." from travis when testing under node 0.8.