Import doc-tools-check-languages and improve it

This is an initial import of an improved version of tools/test-languages.sh
used in repositories like openstack-manuals or security-doc.

Following improvements are included:

* add missing license header
* fix E003: Indent not multiple of 4
* fix E020: Function declaration not in format  "^function name {$"
* rename variables inside methods
* rewrite usage information
* refactor/rename methods (test_fr, test_ja, test_language, setup_lang)

Change-Id: I9fead76f6552fd3f7317605f1e6a0f9cf5b69b26