Merge branch 'refs/heads/release/1.0.0'

Conflicts:
	src/main/java/com/couchbase/lite/replicator/Replication.java
Add docs to DocumentUpdater delegate
Issue #214 - fix by aligning code to iOS

Remove extraneous lastDocID check.

https://github.com/couchbase/couchbase-lite-java-core/issues/214#issuecomment-44208673
Call validateRevision from forceInsert.

Added the logic to call validateRevision in the forceInsert to check that the
current revision abides by the validation (if any). The logic is copied as
it exists in the iOS version.

Issue Reference: https://github.com/couchbase/couchbase-lite-java-core/issues/206
Set the historycounter to start from 1

Since the revisionHistory is passed in descending order, we want the last
successful revision to be set as the "oldRev" property in ValidationContext.
Fix this by starting the counter index from 1 instead of 0
fixes issue couchbase/couchbase-lite-android/issues/214

By setting the size of the underlying data on InputStreamBody at construction time, and returning the value in getContentLength(), this allows apache HTTPClient to send attachments to the server unchunked. Sync Gateway can handle chunked data but the current release of CouchDB (1.5.1 tested) can not.
Fixes #207

https://github.com/couchbase/couchbase-lite-java-core/issues/207#issuecomment-44339498
make Database.addChangeListener idempotent

Adding a ChangeListener to a Database should be idempotent: no matter
how many times the same listener is added, it should only be called
once. This matches the behaviour of Java's Observable.

Without this fix, it's possible for the framework to add the same change
listener more than once, resulting in changes getting processed more
than once, which can have unexpected results.
fixes issue #225
Fixes a problem with unclosed streams

The streams don't get closed during processing and so stay open and thus cause the test ReplicationTest/testPushReplicationCanMissDocs to fail on Windows but more general mean that anytime, anyone ever uses multi-part (which is used, for example, by the pusher) then the streams will be locked forever and attachment cleanup isn't possible.
Fixing my stupid bug

Thanks for finding it!
Android compliant logging

http://developer.android.com/reference/android/util/Log.html specifies that any TAG will be logged automatically at INFO or higher level. You only need to explicitly specify a tag name if you want it to print out at a lower level.
Improving logging on retry failures

I am running requests over TOR hidden services that can fail for very long times. So I need to track when we have a failure that causes a remote request to be given up on. Is there anywhere else a logging even or notification would occur if the replication couldn't get a connection established?
Fix compile error.
Improve logging
Fixes issue #328

Fixes reproducible error, where can not add attachment after a property has been updated.
Add more verbose logging
Issue #241

https://github.com/couchbase/couchbase-lite-java-core/issues/241
Issue #247 use FileBody rather than mis-using InputStreamBody, cleans up errors.

https://github.com/couchbase/couchbase-lite-java-core/issues/247#issuecomment-47792279
Issue #255 - fix attempt

https://github.com/couchbase/couchbase-lite-java-core/issues/255