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