Add :stack to Job::Queue

I have also refactored Job::Queue a little bit to remove all the repetition in `matches_something?` that we've had.