Implements upserts.

@corydobson, @parkr, @MrNice
This is the last change in the series. It implements the `upsert` option for `update` as described in MongoDB [docs](http://docs.mongodb.org/manual/reference/method/db.collection.update/#upsert-option).