Modularize profile javascript

@rlucioni @AlasdairSwan Please review.
If we're going to continue mirroring Napoelon in our JS, maybe this should be moved up so that it's immediately next to the opening of the block comment. As such:

```
/**Student profile page.  This is where students can update
```