MDL-46210 tool_langimport: Rearrange code

Factoring code into a controller class so that the update
can be put into a scheduled task (and be a bit tider).
MDL-46210 add scheduled task for updating langpacks
MDL-46210 langimport: logging for install/update/remove

Now that we have sceduled tasks updating the langpacks, its useful
to log which actions have occured.
MDL-46210 langimport: behat tests

Behat tests for lang import. To run these tests you must define the
TOOL_LANGIMPORT_REMOTE_TESTS constant - because they rely on the
download.moodle.org infrastructure.