(bug 40354) Add support for formatnum in jqueryMsg parser

Support for {{formatnum:$1}} and {{formatnum:$1|R}} syntax in
jqueryMsg parser.

Takes an unformatted number (arab, no group separators and
'.' as decimal separator) and outputs it in the localized digit script
and formatted with decimal separator, according to the current language.

Unlike the result from php for this syntax, this does not do number
grouping(commafy).

See http://www.mediawiki.org/wiki/Help:Magic_words#Formatting.

Includes testcases for a few languages

Change-Id: I912fc719bd25e8b103f87facd05dcb409df7441c