Remove from SYSCALL the dependency on Swing

And add some tests to verify that, on error, SYSCALL will set the return value
to -1.
Add some debug info to CPUGUIThread