Make sure that current and default languages are *always* within the set of available languages.

This *may* fix #1596, but either way is the "right thing to do", and came out of discussion with @b3b on #1497.

This makes sure that the `default_language` and `request_language` are *always* in the set of available language packs.  It uses a shared "best language available" fallback function to determine what language should be used, given the one that was requested.

Testing:
* Nothing out of the ordinary.  Language pack download, default language switching, etc.  Nothing should be broken, at least :)