command: allow setting per-file options at runtime

The intended use-case is for doing this at load time, after the load
command was issued. (See following commit.)
command: add a mechanism to allow scripts to intercept file loads

A vague idea to get something similar what libquvi did.

Undocumented because it might change a lot, or even be removed. To give
an idea what it does, a Lua script could do the following:

--                      type       ID priority
mp.commandv("hook_add", "on_load", 0, 0)
mp.register_script_message("hook_run", function(param, param2)
    -- param is "0", the user-chosen ID from the hook_add command
    -- param2 is the magic value that has to be passed to finish
    -- the hook
    mp.resume_all()
    -- do something, maybe set options that are reset on end:
    mp.set_property("file-local-options/name", "value")
    -- or change the URL that's being opened:
    local url = mp.get_property("stream-open-filename")
    mp.set_property("stream-open-filename", url .. ".png")
    -- let the player (or the next script) continue
    mp.commandv("hook_ack", param2)
end)
player: free subtitle renderer on exit

This was probably commented as an oversight. Since the subtitle renderer
was uninitialized on reinitialization anyway, this had no negative
consequences, except a memory on exit.
player: fix crash on early audio uninit

Could crash when exiting playback in very early stages of
initialization.

CC: @mpv-player/stable
misc: add JSON parser
input: implement JSON-based IPC protocol
manpage: add JSON IPC documentation
input: implement --input-file on unix using the IPC support