Fixed realloc, should be monitors.

Moved found to the end of the loop, otherwise found = 1 causing index 0 to
crash.

HACK: Retrieve video modes from platform-specific code.
Create an event queue to store all MirEvents.

This ensures all events come out of the same thread, as well as ensuring
the threads sync up correctly when touching the event queue.
Fix the found issue. Found needs to be 1.

This is needed for realloc, while index should be 0.  So using i for the
index, and found for the count.
Check queue == NULL if we can't connect to server.
Move redundant free to where its not redundant.
Merge remote-tracking branch 'upstream/master' into travis-osx