mcproxy: fix threads finishing on terminate
All threads in mcproxy were finished by the cpp runtime in a arbitrary order when the destructor of the base 'proxy' class was called. This caused pure virtual member functions of already destroyed child classes to be called (receiver::analyse_packet). Also, a 'timing::worker_thread' that was not finished in time could refer to an already destroyed queue of the 'proxy_instance'.
This led to the crashes of the mcproxy.
Fix: all code related to threads is reduced to one class 'base_worker' and thread finishing functions are called explicitly before the objects they use are destroyed.