client API: restrict client names

Use a fixed size array for the client name, which also limits the client
name in size. Sanitize the client name string, and replace characters
that are not in [A-Za-z0-9] with '_'.
input, lua: redo input handling

Much of it is the same, but now there's the possibility to distinguish
key down/up events in the Lua API.
player: don't crash when using sub_seek without subtitles

Recent regression. It turns out the assertion was completely unneeded.

Fixes #1285.