Fix logistration Jasmine tests

Includes several bug fixes caught during test writing, general clean-up, and adds js-url, a lightweight URL parser
Merge pull request #5857 from edx/renzo/add-js-tests

Fix logistration Jasmine tests
Moved to setting ajaxType with passed in method for models and now handling form load fail errors
Rebased and updated tests