Bug#54334 Double initialization of mysys mutexes
Bug#54334 Double initialization of mysys mutexes

Prior to this fix, mysys mutexes such as THR_LOCK_lock could be initialized
twice by a call to my_init().
The root cause was out of place initialization in my_basic_init(),
calling my_thread_global_init().

With this fix,
- my_basic_init() properly initializes the mutex implementation itself,
for SAFE or FAST mutexes, and for platform dependent initializations,
before initialiazing a mutex.
- my_init() properly initializes mysys mutexes once,
when making the first call to my_thread_global_init().

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