Bug 1078297: Need localized number formatting helper for jinja templates

Also change l10n_format_* helpers to use lang from context.
I believe there is a potential error here (and in the corresponding line 108 for l10n_format_number):

format_date and format_number both expect letters only, so if you pass in 'en-US' (for example) as the locale it throws a `ValueError`. I think we need to add a `.split('-')[0]` to the end here.