windeployqt: Move finding shared libraries into a function in utils.

As it is also needed by qmlutils when scanning QML-imports.

Change-Id: Ia9952171e4bab60984562eb0db860751fd54f572
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>