Make pyboard.enter_raw_repl more robust

In case there's a program in the microcontroller's main.py running in an infinite loop