Added support for "atomic" insert of documents with attachments

Hey,

Here's my suggestion of a fix for the race condition when adding documents with attachments (#198). Basically, here's what's been done:

1) Added new `DocumentWriter.insert`:

```java
boolean insert(DatabaseDocument<T> d, List<DocumentFile<T>> attachments);
```

2) Changed corresponding implementation in `MongoDocumentIO` to set a metadata flag on the document to make `getAndTag` ignore it until all the attachments have been committed.

To understand the behaviour, I suggest looking at the new tests in `MongoDocumentIOTest`.

The other commits are basically a bit of cleaning to simplify the implementation.