Fix replication with attachment and make TestPuller passes again

- Fix MultipartReader and MultipartDocumentReader
- Fix Replication.Stop by ensuring that all the async tasks are done
before returning out of the Stop method.
- Fix Puller.InsertRevisions by ensuring that the CompletedChangesCount
is notified before AsyncTaskFinished method is called to prevent an
issue that  the Replication is called to stop in non-continous mode
before CompletedChangesCount is notified.
Remove a try-catch debugging block
[Tests] TestHeaders now passes

- Ported TestHeaders from the Android Unit Tests
- Ported CustomizableMockHttpClinet from Android Unit Tests into MockHttpClientFactory and MockHttpRequestHandler
- ReplicationTest : Moved private methods to be at the same position
- ReplicationTest : Fix ReplicationWatcherThread started flag not getting right value
[Tests] TestAllLeafRevisionsArePushed now passes

- Ported ReplicationTest.TestAllLeafRevisionsArePushed from the Android Unit Tests
- Fix Database.CreatePushReplication : Pusher should get the HttpClientFactory from the Manager by default
Merge pull request #55 from couchbaselabs/replicationtest-testallleafrevisions

Replicationtest - TestAllLeafRevisionsArePushed