Consolidate to outputting the licensing info when we pass -version to a binary.
Prior to this commit, the behavior is inconsistent between the various binaries.
This is a partial backport of core#24409
https://github.com/bitcoin/bitcoin/pull/24409/commits/2618fb8d15d01dca967856c92ebf3e4cc09699a2
Depends on D16215