NSApplication subclass with additional delegate methods for various useful things.