Perl: add support for hexchat_event_attrs

Short demo: https://dl.dropboxusercontent.com/s/06o6r8zobacoroe/attrs.pl
Also, userdata doesn't seem to be optional now, nor does it seem to have been optional before.