Fix crash on exit in embedding case

Fix crash due to threads not being joined before cleanup inside of
mono_jit_cleanup. mono_jit_cleanup now calls mono_thread_manage before
calling mini_cleanup