Add a hook to let Macro.getOptions() look at more threads

Unfortunately, Macro.getOptions() is thread local. This assumes that the
number of threads interested in the options is 1 (wrong), and it also
assumes that the same thread should be able only to run one macro (wrong
again!).

Nevertheless, we have to work around the design to fix the case when
scripts are called from within macros and those scripts instantiate
GenericDialogs directly or indirectly that want to use the current macro
options.

This commit introduces the getThreadAncestors() method to the legacy
hooks. By overriding it, the caller can provide a list of thread
ancestors which ImageJ 1.x might have associated with the macro options
in question.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Remove silly Macro.getOptions() restriction

ImageJ 1.x insists that macro options can be set anytime, but only
retrieved when the current thread name starts with "Run$_".

Let's not do that.

If there are problems as a consequence, those problems have to be fixed
properly (there could be problems when the options are not correctly
removed, for example, due to missing finally { } blocks). If that is the
case, we will attack them full on instead of papering over by reverting
this commit.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge pull request #27 from imagej/threaded-macro-options

Address two issues with Macro.getOptions()