(maint) extract eventmachine thread lifecycle helpers
(maint) extract eventmachine thread lifecycle helpers

Here we extract the common start/stop eventmachine thread blocks
to methods, so we can add some additional debugging to them.

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