inital work on toConstructor in mongoose, needs tests
toConstructor() working and tests written

passing all tests. Additional fixes for dealing with `sort` passed via
`setOptions` Moral of the story: the storage format for sort sucks
Updated mquery version, removed sort hacks

Updated to new mquery version which gets rid of the terrible internal
sort syntax.
Fixed call signature of custom query call to super

Hadn't switched it from the old Query constructor syntax
New API for the connection pool sharing

This seems to work and passes all of the test cases. Might be slight
issues related to events, but they all seem to be functioning properly
Fixed setup for dbs when not connected

Also, added a lot more test coverage for all of the different events.
refactored one test that wasn't checking a value that would guarantee
correctness.
tests; validate db contents
tests; close some connections
remove unneeded helpers

we would only need this if we needed to run outside Node.js
tests; clean up rebase mess
docs; query.toConstructor()
utils; fix utils.merge

added test case
Merge pull request #1655 from j/merge

utils; fix utils.merge