Added ssl support. Note that Mongo is very picky about the format of the connection string: trailing `;` or `/?` cause errors, so this section is slightly awkward.