MDL-35238 Make the auto-deploy feature lockable via config.php

If $CFG->disableupdateautodeploy is set in config.php, no automatic
deploy can happen. This is for sites that are managed by a provider but
their clients have admin access.
MDL-35238 Introduce available_update_deployer class

This class represents the communication bridge from Moodle UI to the
(standalone) mdeploy.php utility. It consists of various helper methods
useful when dealing with user interface, update confirmation etc.

The class is implemented as a singleton. This allows us easily
transfer required data from top level scripts (like /admin/index.php)
into the rendering methods deep in the stack without the need to change
the API of many methods on the way.
MDL-35238 Display a button to install an available update
MDL-35238 Handle the update installation request - display the confirmation page
MDL-35238 Admin renderer method to display the plugin update confirmation page
MDL-35238 Implement deployment authorization

The caller of the mdeploy.php utility is expected to create a file in
the data directory. The name of such file and the passphrase in it are
then sent to mdeploy.php as a part of the request. The submitted and
stored values are then compared.
MDL-35238 Reorganise the worker::execute() flow
MDL-35238 Fetch the package and store it in a temporary location
MDL-35238 Backup existing plugin version before replacing it

This is here to save eventual local contributions to the plugin before
we replace the whole directory in the next step.
MDL-35238 Unzip the downloaded package and redirect to the upgrade page
MDL-35238 Support deployment from yet another plugins check page too
MDL-35238 Warn the admin if they are about to overwrite a SCM checkout
MDL-35238 Fetch available updates using the 1.1 version of the API

If the stored response has still 1.0 version (which is expected during
the upgrade to 2.4), a debugging message is displayed. Added a string to
explain what's going on and how to recover from the state.
MDL-35238 Compare the ZIP package content hash with the expected value

The expected value is returned as a part of available update info
(requires API version 1.1).
MDL-35238 Remove the ZIP file after successful decompression
MDL-35238 Fix the unit test for invalid input_manager::TYPE_URL values
MDL-35238 Add simple logging of mdeploy.php execution
MDL-35238 Be more verbose if the tilde character is used in TYPE_PATH script options

The tilde character is not generally supported in Moodle. Previously it
was just removed silently and it was difficult to realize what was going
on.
MDL-35238 Improve exceptions handling
MDL-35238 Add support for explicit singleton reset

This may be needed during PHPUnit testing.