Tools: Fix MiniBrowser, DRT and QtTestBrowser build

Use Q_EMIT instead of emit and use Q_FOREACH instead of foreach.
Tools: .pro fixups for out-of-tree build
build hacks
WIP: stop download requests when script element is removed