use a central dispatch function for received messages
all irc messages we're interested in share more or less the same
layout, and differ only in number of arguments and what these mean.
we use a few tiny data tables to hardcode knowledge about the
number of arguments, and how we re-arrange the order of these
arguments for our handler functions. additionally all the msg
arguments, which always are sent last, begin with a ':' char
so those pointers must be incremented by one before passing them
on.
even though this commit actually increases the number of code
lines, it removes 3 almost entirely duplicated functions,
and should remove binary size as well. in a followup commit we'll
do further cleanup by removing the intermediate C-to-JS wrapper
functions.