mediawiki.language: Implement Language::listToText in JS

For I35e55658 in VisualEditor.

Change-Id: I5d894f8a1cba65a3d90dfbf3e43be4e515a327d1
Merge "mediawiki.language: Implement Language::listToText in JS"