Fix the deadlock in resume function

In resume method of gdb server, it don't have any check for the shutdown_event event. So when user in put c in their gdb, the gdb server will enter the dead loop of resume function. Crtl + C will set shutdown_event, but there's no way for the gdb server thread to detect it.