Correctly deletes events in javascript queue when they have been processed fixes #274

The javascript queue is now correctly updated and a new configuration config.trigger_success_by_default (Boolean, defaults to true) exists. A result is triggered for each event, and the default result is success.