Bug#35106: mysql_secure_installation fails on Windows, missing "use Term::ReadKey"
Bug#35106: mysql_secure_installation fails on Windows, missing "use
Term::ReadKey"

Add the missing module import.  Also, while here, fix a few glaring problems
with the script, and ensure that it behaves properly.  It seems this script
may have never been working correctly (e.g., reading password didn't chomp()
the result, so password was set with \n at the end; comparing the re-typed
password to original was done with inverted test).

Add END { cleanup(); } block to ensure the script removes temporary working
files.

Add SIG{INT} / SIG{QUIT} handler.

Do a bit of reorganization to make the code easier to understand.

Limit failed connection attempts to 3.

Use ./bin/mysql if it exists, and then fall back on mysql in PATH (before it
assumed 'mysql' in the path).  Print a nicer error if 'mysql' can't be called.

This has been tested on Windows (ActivePerl from cmd.exe, no cygwin needed)
and Linux.


ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,slanterns/server,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,ollie314/server,ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,flynn1973/mariadb-aix,flynn1973/mariadb-aix,ollie314/server,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,natsys/mariadb_10.2,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,ollie314/server