Allow changing of language preference from profile page

This adds profile API functions for handling the fetching and updating of user preferences, a language selection form to the profile page, new JS to process the form's submission, and modifies the profile views to handle this new functionality. Also includes a handful of small tweaks to make things more consistent.

@wedaly and @dianakhuang, could you review this?
We're not currently using it. The thinking behind adding it was to allow the layer consuming this API to provide default preferences to set in case the user doesn't have these preferences set. If they do, the default preference values are overridden. @wedaly, do you have anything to add here?