WL#11636: InnoDB: Clone Remote provisioning

Affects: Server-8.0   —   Status: Complete

In WL#9210, we supported clone of remote database server. In order to provision
a replica using clone, it involved multiple steps as shown below.

1. Initialize a dummy database directory in recipient node and start mysql server.
2. Connect to this server and execute CLONE command to clone data from remote 
donor server to a new data directory in recipient.
3. Shut down mysql server in recipient node and restart on new data directory.
4. Delete/Remove the dummy data directory in recipient

This worklog aims to simplify the method of provisioning by allowing clone
directly into recipients current data directory and also allow cloning process
to be completely driven via SQL command after a server is started.

Also, before cloning, it is advantageous to detect some of the error cases
early. This WL would also support pre-conditions checks before clone.

A. User commands: Provision/Re-provision a node
------------------------------------------------
1. Choose a donor instance to clone from

2. Install clone plugin in donor 

3. Have clone user in donor with BACKUP_ADMIN privilege

4. Choose the recipient instance to Re-provision
   For new server provisioning, create a DB and start server.

5. Install clone plugin in recipient

6. Have admin user in clone with SYSTEM_VARIABLES_ADMIN privilege.
   Set valid clone sources.

7. Have clone user with following privilege
     CLONE_ADMIN : allow to drop and replace current database

* This privilege also allows clone to  
     - block all DDL  [implicit BACKUP_ADMIN]
     - restart server [implicit SHUTDOWN privilege]

8. Connect using clone user and clone

CLONE command would transparently replace the current data directory and restart
server. We use RESTART feature here introduced in WL#9809. The clone operation
can be monitored from another session.

Clone operation:
---------------
1. Take backup lock to prevent any more DDL in recipient.
2. Drop all existing user tablespace/data : 
      reduces the DB size for re-provisioning
3. Clone from remote instance in place
    - for user tablespace files copy as it is
    - for all system files keep it as .clone
      e.g. for DD mysqld.ibd.clone
5. Restart server
    - Replace system files from .clone
    - usual server start up [initialize DD, built-in plugin etc.]
    - allow users to connect

Clone Privilege:
----------------
1. [Existing] SYSTEM_VARIABLES_ADMIN privilege in recipient: 
   Allow configuring valid data source(s) for clone
      mysqld configuration variable that would store the list of IP:PORT
      ;; ....
      user with the above privilege can modify the configuration.
2. [New] CLONE_ADMIN privilege in recipient: 
    allow clone to replace current database instance
      CLONE INSTANCE FROM ...
      * It can clone only clone from one of the pre-configured
        locations defined in [A]
C. [Existing] BACKUP_ADMIN in both donor and recipient
D. [Existing] SHUTDOWN privilege in recipient for automatic RESTART

B. Pre-condition check
----------------------
1. Confirm that MYSQL server versions of donor and recipient match
2. Confirm that the OS is same in donor and recipient
3. Confirm that the disk space available in recipient is enough
4. Confirm the paths for files stored outside data directory
5. Confirm that the all plugins of donor are deployed in recipient
6. Confirm that the character sets of donor and recipient match
7. Confirm that Innodb specific data configuration match e.g innodb_page_size
8. Confirm that the security key plugins match