Add autoSendOnUnload feature

- Add tracker examples.
- Wrap example apps (app.js and tracker.js) with closures.
- Fix lint errors.