fix(agent): Retry agent heartbeats

Attempt agent heartbeats three times with an exponential heartbeat.

Fix #116
test(functional): Clarify retry code
test(functional): Alter timings