IJ1Helper: add defensive programming for EDT

This avoids deadlocks in favor of failing fast, when something
attempts to run a macro directly from the event dispatch thread.
Merge pull request #92 from imagej/avoid-edt-deadlocks

IJ1Helper: add defensive programming for EDT