fix srp tests, bad mailer function
Make ClientApi an EventEmitter, to allow tracking of APi requests.

This makes it more suitable for use in a loadtesting script.
Add some initial exploration of talking to loads from JS