Bitcoin-Qt: fix QApplication includes to match our include defaults

- move all QApplication includes to top of included Qt headers
- undef our loop macro where it would cause compilation errors otherwise
Merge pull request #2847 from Diapolo/fix_QApplication_include

Bitcoin-Qt: fix QApplication includes to match our include defaults