redo mouse handling yet again

So that the frontend can actually receive mouse down/up events.

- mouse movement is not a pseudo-button anymore, just emits a hardcoded
commmand (which is handled in command.c, and which happens to call a Lua
function)
- MOUSE_BTN0 is still mapped to mouse_click; you can't actually track
more than one mouse button
- instead of mapping input via input.conf, hardcoded Lua function names
are used to map mouse events (see test.lua changes)
- some aspects of normal input handling might be broken, have to check
later