cleanup: thd_destructor_proxy
cleanup: thd_destructor_proxy

1. wait for thd_destructor_proxy thread to start after creating it.
   this ensures that the thread is ready to receive a shutdown signal
   whenever we want to send it.
2. join it at shutdown, this guarantees that no innodb THD will exist
   after innobase_end().

this fixes crashes and memory leaks in main.mysqld_option_err
(were innodb was started and then immediately shut down).

natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2