Be explicit with Qt link libraries

For the analysis tests, instead of linking with all the found
QT_LIBRARIES, pick only the ones that are needed.