Fix typo causing sql error

If doing ordermethod=popularity on a wiki with $wgDisableCounters
set to true, sql error results due to a spelling mistake (d'oh!).

Sufficed to say, that's rather embarassing :s

Also change how code handles an unknown value, in
the internal ordermethod variable, since that
should never happen.

bug: 46523
Change-Id: Ibc38d3a092e4cff3147f77f7cdb51ebc0ad54a0e