Perl: add support for hexchat_event_attrs

Short demo: https://dl.dropboxusercontent.com/s/06o6r8zobacoroe/attrs.pl
All of these (long) casts should be (NV) casts. long is not guaranteed to be able to hold a time_t (and in fact on Windows it can't).