test($file-upload): #1063 start of upload unit tests

- 1st test: very simple upload
- Extended assert framework to allow for assertion counting
- Added sinon.js support for mocking XHR
- Code to mock FormData (for examining request params in tests)
- Adjustment to sinon to deal with lack of ProgressEvent constructor in phantomjs