Check for network connectivity before POSTing.
Only expose a `setNetworkConnected` mutator fn.
Always return true for isNetworkConnected in Java.
KeenNetworkStatusHandler interface.

This replaces the Builder.isNetworkConnected method with a
KeenNetworkStatusManager interface, a default implementation
(AlwaysConnectedNetworkStatusManager), and an Android-specific implementation.
Long lived references to the builder object are remove from the KeenClient
object.
Whitespace cleanup.
handleFailure on no network.
Limit max attempts, make it configurable.

This tracks and limits the maximum number of attempts that will be made to POST
an event before removing it and giving up. It defaults to 3 and is configurable
via the `KeenClient.setMaxAttempts` function.
Revisions from @geeber.
Two more @since updates.
Fix attempt test to reflect housekeeping.

Also, increase the granularity and completeness of that test.
Merge remote-tracking branch 'smurthas/reachability' into 2.1.0

* smurthas/reachability:
  Two more @since updates.
  Revisions from @geeber.
  handleFailure on no network.
  Whitespace cleanup.
  KeenNetworkStatusHandler interface.
  Always return true for isNetworkConnected in Java.
  Only expose a `setNetworkConnected` mutator fn.
  Check for network connectivity before POSTing.
Wrap blocks in {}.
Remove redundant add event line.
Update docs for KeenClient.getAttempts.
Make the __attempts.json file name into a constant.
Just log an error upon failing to set attempts.
Handle all attempts set/get exceptions in client.
Synchronize the work on the attempts map.
Only synchronize and count attempts when needed.

Only if the eventStore is an instance of KeenAttemptCountingEventStore.
Only check network state if permission is granted.