Complete issue #223

- Port fix for not uploading previous revision attachment
- Port Database.StubOutAttachmentsInRevBeforeRevPos()
- As part of the port, Replication.revisionBodyTransformationFunction and propertiesTransformationFunction are included but not used as they are not part of v1.0.0 release. A note regarding this has been added to the code as well.
- Fix Pusher.UploadMultipartRevision — SyncGateway doesn’t like MultipartForm content so changing it to multipart/related is needed.
- Fix Database.StubOutAttachmentsInRevision() to make it working correctly.
- Add ReplicationTest.TestPusherFindCommonAncestor() and DatabaseTest.TestStubOutAttachmentsInRevBeforeRevPos()
- Remove unused Database.LastSequenceWithRemoteURL()