GenericDialogPlus: organize imports
GenericDialogPlus: skip UI calls when headless

This change makes GenericDialogPlus work when running in headless mode.
It addresses the following bug discussed on fiji-devel:
  https://groups.google.com/d/msg/fiji-devel/je7frY9pu8Q/F-RJExwX8T8J
Move GenericDialogPlus main method to src/test
GenericDialogPlus: fix warnings