Issue #52 - add debugging to try to expose this bug.  So far still not able to repro.

https://github.com/couchbase/couchbase-lite-java-core/issues/52
Issue #93 Fix by porting iOS code over.

https://github.com/couchbase/couchbase-lite-java-core/issues/93
Issue #93 Fix follow up bug by correcting the status.

https://github.com/couchbase/couchbase-lite-java-core/issues/93
Merge remote-tracking branch 'upstream/master' into thaliauth

Conflicts:
	src/main/java/com/couchbase/lite/router/Router.java
Forgot to include in previous commit
Issue #52 - fix by correcting the port from iOS -- there were a few variables that had nearly identical names, and I must have thought it was a single variable.

https://github.com/couchbase/couchbase-lite-java-core/issues/52
Merge remote-tracking branch 'upstream/master' into thaliauth
Undoing my changes to replication.java since the bug I was working around is now fixed in upstream