MDL-38493 Make mdeploy.php able to install new plugin

The patch implements the second mode of the mdeploy.php script. If
--install option is passed, the given package is downloaded, verified
and deployed to the requested location.
MDL-38493 Improve documentation of mdeploy.php
MDL-38509 Document the plugin deployment lockers in config-dist.php
MDL-38509 Implement new plugin_manager::get_plugin_types()

This new method just takes the result of the core get_plugin_types() and
re-orders the plugin types in the same way as they are displayed at the
Plugins overview screen.
MDL-38509 Implement new plugin_manager::plugintype_name()

This has exactly the same behaviour as the existing
plugintype_name_plural() method, but returns the singular form of the
plugin type (such as 'Activity module').
MDL-38509 Initial version of the new admin tool to install add-ons
MDL-38509 Mark the new installaddon admin tool as the standard plugin
MDL-38509 Check for writable plugin type location in install from ZIP form

Standard mform validation is implemented as well as progressively
enhanced AJAX version.
MDL-38509 Implement the plugin ZIP package validator

The validator code contains (modified) fragments of the
local_plugins_archive_validator class copyrighted by Marina Glancy that
is part of the local_plugins plugin. It operates over an extracted
copy of the ZIP file.
MDL-38509 Add new tool_installaddon_installer::get_plugintype_root() method
MDL-38509 Save uploaded ZIP into a temporary location and redirect to validator
MDL-38509 Add new tool_installaddon_installer::extract_installfromzip_file() method
MDL-38509 Implement the ZIP package validation page

The script validate.php expects a ZIP file stored in a temporary
location. It extracts the ZIP (optionally renaming the root directory)
and executes the validator. Then it renders the validator log messages
and continue buttons.
MDL-38509 Add strings for the new admin tool
MDL-38509 Add the script that finally deploys the validated ZIP contents
MDL-38509 Fix the communication protocol with Moodle plugins directory

Implements the behaviour currently specified at
http://docs.moodle.org/dev/On-click_add-on_installation