add really hacky and complicated Lua test

This is to avoid crashes in libquvi, if libquvi and mpv link to
different Lua libraries (such as mpv to 5.2 and libquvi to 5.1).

We don't know what libquvi links to in general. In order to check
whether a combination of libraries actually works, we run the resulting
test binary. Of course this only works when not cross-compiling.

We also add a --lua switch to configure, which allows selecting which
Lua library to use.

All this sucks, but will probably do the job.
w32_common: restore mouse event thingy

I told Kovensky to put this into the common code, and now I'm moving
it back. Oh well, at least it proves my point because the code size
grows.
input: minor simplification

Avoids the situation that update_mouse_section() could in theory
recurse.