fix(agent): purge state when offer resolved elsewhere

If a job offer is resolved elsewhere, the state is no longer
useful to the local Agent. It should be removed to ensure
it does not conflict with future attempts to run future
revisions of a given job.
fix(agent): clear empty entries when dropping peers

When a job no longer has any peers, it does not need to
be tracked. This will help keep the memory usage of the
fleet agent under control.
test(functional): long-running fixtures

It helps debugging if the units used in functional
testing never exit, acting more like long-running
services.
fix(agent): agent initialization

Wait for the agent to successfully push its
state to the Registry before resuming normal
operation. This prevents the watchers from
losing events during startup.
refactor(agent): remove duplicated code