'Before' observer write ability, stabilise

* Before observers can now modify body args & have these modify the xhr
request (e.g. change the subject prior to sending, add in cc field etc)
* Fixed file uploading & added upload_attachment event in the process.
* fix after events by correctly checking binding. Change order to bind
prior to sending xhr
* Code cleanup (comments, standardising coding style)