Started patching unit tests
API updates mostly patched.

- Fixed Media tests
- Refactored Media model - it is now a proper ng module
- Patched various broken features because of API update
- Refactored rails resource - the case-changing functions are now exported in their constant so unit tests can use them
- NOTE: server side error means audio d/l failing. Not fully tested yet.
Finished fixing bugs.

Audio urls fixed up. Added explicit ordering since Angular's ng-repeat decided to start ordering things all of a sudden.
Also fixed up audio urls and spectrogram urls on annotation library page.
Fixed bu on annotationItem page that was causing binding errors... gave an empty configuration.
Resolved merge conflict
Merge branch 'media-api-fix'