Change Conflict resoultion logic to accept CDTMutableResolution

- Allow a new revision of the document to be returned to resolve the confict
- Throw Exception if revision returned is a completely new revision
- Add test for exception being thrown when the MutableDocumentRevision without a sourceRev is submitted as a conflict resolution
- Add tests for MutableDocumentRevision with sourceId with and without attachments is successful accepted as the conflict resolution.
Merge pull request #55 from cloudant/33661_update_conflict_handling

33661 update conflict handling
Update with code snippet returning mutable revision from resolve()
Adds tests for CDTReplicator.state when a local datastore is deleted during replication.

This test currently fails because CDTReplicator.state == CDTReplicatorStatusComplete,
when it should probably be something else (Error, with appropriate error message).