Java client v2: Heartbeater (+ utilities + tests).

- Duration utility class (+ unit tests).
- PingCommandMatcher utility class, for easier, less verbose testing.
- Heartbeater (+ integration tests against fake dispatcher / local
server).