Extracted language preference middleware to its own repo

Since @dmitchell pointed me this way, I'd recommend keeping the "is_authenticated()" check. This middleware will be called all the time, so if there's no authenticated user (aka AnonymousUser) then this will cause a round-trip to the database looking for a user_id = 0.