(maint) ensure EventMachine is stopped when raising
(maint) ensure EventMachine is stopped when raising

When using raise for flow control we may be leaking the eventmachine
reactor thread, which makes it hard to reason about the lifecycle of a
subsequent run.

Here we move the stop_event_loop and thread join into an ensure
block, so we close down the eventmachine context when signalling
hitting the Timeout stuff.

puppetlabs/pxp-agent,puppetlabs/pxp-agent,puppetlabs/pxp-agent