Don't risk missing events in gather_job_info

Seen with syndic, but in theory affects all setups. When a we call
gather_job_info if an event comes in for the main job we can discard the
event whilst we are looking for the gather_job_info event. To work
around I've made gather_job_info add events for the main job to the
pending_events list. get_event now always checks that list for events
matching it's tag

Conflicts:
	salt/utils/event.py
Pull out pending_events changes and reuse

PendingEventsBase implements all the pending_events queue management
Make both normal SaltEvent and raetevent.SaltEvent inherit from this to
standardise the get_event interface.
Update tests for event.SaltEvent (Couldn't find tests for
raetevent.SaltEvent)
Merge pull request #14298 from mbirtwell/dont_drop_events_during_gather_job_info

Dont drop events during gather job info