Be even more careful with thread state when testing

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make menu structure test easier to debug

By switching to a LinkedHashMap, we keep the order in which the menu
items were added by ImageJ 1.x intact.

This helps when debugging why certain things did not work as expected
because we get a clearer picture at what *point* things went wrong.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Let ij1.plugin.dirs point nowhere when testing the menu structure

Under certain circumstances, ExtraPluginDirsTest can be executed before
HeadlessCompletenessTest, and on Windows, the temporary directory is not
removed (due to locking problems). So let's just make sure that
ij1.plugin.dirs no longer points to ExtraPluginDirsTest's temporary
directory.

Thanks Jedi Jenkins!

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>