Add utils for printing JS exception details.
Fix JS exception reporting.

- Provide greater details by printing stacktrace.
- Give correct filename and locations.
Merge pull request #17 from joshthecoder/timob-12510

TIMOB-12510: Provide better exception reporting.
Extend all modules from TiProxy.

This will enable the event listener APIs on module objects.
Make handler object in EventPair optional.

Switched to using scoped pointer to clean up container and handler.
Expose runtime and object factory.
Allow firing events without data argument.
Support firing custom events.
Fix firing custom events on modules.
Merge pull request #18 from joshthecoder/timob-12511

TIMOB-12511: Support custom events on proxies and modules.