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.
Fix attempt test to reflect housekeeping.

Also, increase the granularity and completeness of that test.
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.
Merge pull request #29 from smurthas/max-attempts

Max Attempts