Make two HandlerThread quit when main activity finished.

The two handlerThread is mWorkingHandler in MotionEventHandler.java and mMachineHandler in TimeMachine.java.