The 127-byte limit on index names is specific to mmapv1 storage. For both commands and legacy inserts (to system.indexes), we can rely on the server to validate the length accordingly. Added tests for legacy inserts to ensure an exception is still thrown (albeit with a different message directly from the server).
…ke it accept a link instead of a collection.
…MongoClient::selectDB and MongoClient::selectCollection into C functions
Mostly based on Hannes' code in #629