MDEV-8066 Crash on unloading semisync_master plugin
MDEV-8066 Crash on unloading semisync_master plugin

Bug was that ReplSemiSyncMaster::commitTrx() was waiting on a condition
for state to change, but didn't take into account that one could have
disabled semi-sync during the wait.

ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,ollie314/server,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,ollie314/server,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,ollie314/server,flynn1973/mariadb-aix,flynn1973/mariadb-aix,ollie314/server,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix