Make lang:parseFormattedNumber more like tonumber

Users seem to expect that mw.language's parseFormattedNumber will act
like tonumber when given nil or other non-string values, returning nil
instead of raising an error. There's no reason not to, so we may as
well.

Change-Id: Ie0ff19efc84ca738e115bbd524bfd92fccf26127
Merge "Make lang:parseFormattedNumber more like tonumber"