Add bcp47() and directionality() to toolforge_i18n.language_info
These can replace lang_int2html() and text_direction(); I assume the
only reason I didn’t get this information from the API to begin with is
that text_direction() was introduced in a79cac33a3, almost a year before
0ec650ea2f first started using the languageinfo API. But now that we
already use the languageinfo API we might as well get the HTML lang= and
dir= from there.
Neither function returns None. bcp47() defaults to the input language
code if it’s not known to MediaWiki; most language codes, and especially
new ones being added to MediaWiki (compare ae42f7e3d6 / T345807), should
be the same between MediaWiki and BCP-47, so this seems safe to do.
directionality() defaults to 'auto' to let the browser figure out
something.
(directionality() has a long name because dir() is already a standard
Python function.)