Language selection: case-insensitive and system language

Fixed ignoring HTTP_ACCEPT_LANGUAGE tags that had uppercase
characters.
^ This shouldn't need any attention.

Fixed defining a->language too soon to ever get the system language.
^ Mike please see if I didn't screw anything up since I messed with index.php ;-) From what I could find none of the stuff I skipped uses language anyway, so it's fine only to define that at those later points.

Anyway I tested both changes and everything is working as expected.

Oh yeah, this should improve the situation, if not fix, issue #465