Modified the names of the parameters to the FUNCTION add_event,
and all appearances of of the parameters, adding 'i_' suffix.

This fixes syntax errors which prevented this code from running
in postgres 8.4.13.