Tools: Fix MiniBrowser, DRT and QtTestBrowser build

Use Q_EMIT instead of emit and use Q_FOREACH instead of foreach.
WKTR: Fix build

Added QEvent forward declaration.
Tools: .pro fixups for out-of-tree build