textscreen: Fix use-after-free with mouse press.

When propagating mouse button presses to widgets within the window,
return from MouseButtonPress() immediately, or we will fall through
to additional code that references the window structure. If the
handler for the widget we clicked on closes the window, this will
have been freed.

This fixed #439. Thanks to DuClare for telling me about this.
Fix OPL MIDI tempo calculations.

It turns out that the way that tempo has been calculated in OPL playback
has been broken for a long time. The mysterious "fudge factor" that I
had to apply to tempo calculations is actually completely unnecessary:
the byte-swapping in the MIDI_GetFileTimeDivision() function was being
done wrong, so the time division being used by the OPL MIDI code was
completely wrong. Presumably the multiply by 260 was close enough to an
8-bit bitshift that it worked okayish, but large enough time division
values would overflow a single byte and screw up.

This fixes long-running OPL playback problems in a number of WADs, most
notably Alien Vendetta. This *really* fixes #352.
Fix crash caused by adding a new WAD file.

This fixes #442, a crash caused by adding a new WAD file after a
lump has been loaded (and cached) from a previous WAD. This
manifested when playing using the Freedoom IWADs and also loading
a PWAD at the same time. The Freedoom IWADs have DEHACKED lumps
that are loaded from within the IWAD file.

The ultimate cause (thanks to Fabian Greffrath for uncovering it)
is that lumpinfo is realloc()ed after each new WAD load to store
the lumpinfo_t structures from the new WAD. If a lump has been read
and cached from a previous WAD file, it may end up having an invalid
'user' pointer that points to somewhere in the old lumpinfo[] array,
not the new one.

I think this bug was masked because realloc() will often not move
data if the previous location can simply be extended. The bug was
discovered when loading BTSX as a PWAD, probably because it's a
large WAD that contains a lot of lumps, and forced a move during
realloc.
Call SDL_Quit() on exit

Hopefully this may fix issue where exe very occasionally continues to
run in background after exit. See chocolate-doom/chocolate-doom#408.

Conflicts:
	src/i_system.c
doom: Add -noiwaddeh command line parameter.

Both the Freedoom IWADs and the rereleased HACX IWAD contain embedded
DEHACKED lumps that are automatically loaded on startup. However,
there may be some situations where it is undesirable to load these
patches - when loading certain mods such as BTSX, for example. For
these cases, allow the user to override the default behavior with a
command line parameter.
Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doom

Conflicts:
	src/w_wad.c