Implement on2, on3, on4, on5

These functions make it easier to register handlers for events that take
more than one argument.