zsh completion: complete profiles and misc. fixes

Only functional change from what I posted in the other thread is to use $words[1] instead of hardcoding mpv.

I made a separate heredoc and included it in the main one, because I thought trying to escape everything would be a nightmare to maintain.

Also fixed some stuff up. The ret/rc thing was causing a second tab press to delete the `//` at the end of a protocol. I'm not aware of the global env pollution causing any actual bugs, but according to the zshcompsys manpage, we're supposed to make them local.