The former delegate approach had some drawbacks as one class could
be only delegate for one panel. This commit replaces it with a
completion handler block which moves the result handling code
closer to the actual creation of the dialog.
Also fixes crash for eq panels.
Splits PopupPanel and TextfieldPanel into two xib files and
creates NSWindowController subclasses for each panel.
Each user of the panel gets its own window controller instance.
This is needed as the same kind of window can be shown multiple
times simultaneously (e.g. both in video and audio effects).
This also did not work with the previous implementation of the
2.2 branch and fixes broken behaviour.