Issue #190 - make it possible to call replication.goOnline() and goOffline() from something that monitors the network status.

1. make goOnline() and goOffline() public (for now)
2. port some functionality over from iOS regarding retry behavior for failed push requests.
3. call setError() in several places that were just setting the instance variable
4. increment revisionsFailed whenever appropriate

https://github.com/couchbase/couchbase-lite-android/issues/190
Issue #190 - fixes to the code to make the test pass

The main change is to use a LinkedHashSet rather than a List, because dupes were getting in the inbox (which could merit further investigating).

Also, the online state wasn't being correctly set everywhere, nor were notifications being sent out to change listeners at all times.

https://github.com/couchbase/couchbase-lite-android/issues/190
Merge branch 'refs/heads/issue_190'

Conflicts:
	src/main/java/com/couchbase/lite/replicator/Puller.java
	src/main/java/com/couchbase/lite/replicator/Pusher.java
	src/main/java/com/couchbase/lite/replicator/Replication.java
	src/main/java/com/couchbase/lite/support/Batcher.java