Wait for all user input to be released before re-activating the core

Wait for all user input to be released before re-activating the core; this prevents undesired button releases (for A,B for example) being passed to the core.

**Please check** for side effects of calling *rgui_input()* and *rarch_input_poll()* in that context, I didn't check them.
Also the usleep() call could be tuned to a different value or removed completely - depending on your judgement.