MongoDB optimistic locking updates implemented.

Version is now atomically updated using a 'compare and exchange' type
atomic operation, avoiding possible race conditions in a
multi-threaded or multi-process situation.

Note that this means at least an 'acknowledge' level of write concern is always
used for versioned entities.

Added a corresponding note to the docs.

I also ran the test suite and had no failures.