Added a deprecation notice to ensureIndex, and update tests.
Fixed hardcoded port number.