When the master client fails to connect, it should stop trying

With the current implementation, users will end up continuously
retrying to connect to the master, because of the while loop in
each MasterClient method like

```
while (!mIsShutdown) {
      connect();
      ...
}
```

Instead of returning a boolean, we will now interrupt the control
flow during exceptional conditions, as this will should allow current
users of this API to handle it (rather than having to change every
usage of `connect()` to include a check that throws a less-helpful
error message).

Note that this does require a breaking API change, as we have added
checked exceptions to several public APIs. Since these APIs actually
do incur IO, it seems reasonable that they might throw IOExceptions,
however. The alternative would be to wrap our IOExceptions in
RuntimeExceptions, but this isn't exactly the "Java Way".
Stop the heartbeat thread.
Slight refactor of the check-for-shutdown logic
Merge pull request #204 from aarondav/client-fail

When the master client fails to connect, it should stop trying