Refactor base.html and app.html

As a follow up to https://github.com/codalab/codalab/pull/416, this change refactores base.html and app.html (introduced as a pure angular index file), into base.html to avoid code duplication.

Additionally, fixed an Internet Explorer specific issue regarding calling the 'api/worksheets' API more than once.