This PR adds a test macro _BITCOIN_QT_CHECK_APP, which ensures that Qt resource system object (*.rcc) have being compiled and linked properly. Found it such checks very useful while working on bitcoin/bitcoin#24798.
Here are examples from configure logs:
- successful check:
 0...
 1checking for Qt5Core >= 5.11.3... yes
 2checking for QCoreApplication initialization... yes
 3checking for Qt5Gui >= 5.11.3... yes
 4checking for QGuiApplication initialization... yes
 5checking for Qt5Widgets >= 5.11.3... yes
 6checking for QApplication initialization... yes
 7checking for Qt5Network >= 5.11.3... yes
 8checking for Qt5Test >= 5.11.3... yes
 9checking for Qt5DBus >= 5.11.3... yes
10...
- failed check:
0...
1checking for QCoreApplication initialization... no
2configure: WARNING: QCoreApplication failed to initialize.; bitcoin-qt frontend will not be built
3checking whether to build Bitcoin Core GUI... no
4...
The fourth commit may fix build in some weird setups, but it is definitely required for Qt 6.