Better tests for forking hooks

Fun times with this one in production today. cc @strzalek

Basically, this code checks if the job _can_ fork before running the before_fork, rather than checking if it _will_ fork. In our case, we were moving from forking to not-forking, and didn't remove the hooks (so that we could revert quickly). Our before_fork fired, but the after_fork did not. Much sadness ensued.