capture-libs: Compare symbols and versions to determine order
This is a second attempt of !19 (merged)
!19 (merged) has been reverted because with some libraries it crashed 6d9833be
To solve this issue now I don't dlopen the libraries anymore but I just inspect their header to get the list of symbols and versions.