De-duplicate shared library targets in generated link lines

The linker will bring in shared libraries as a whole and use them even
for symbols that are needed by entries later in the link line.
Therefore we do not need to repeat them.  De-duplicate link entries that
we know are shared libraries because we have a cmTarget associated with
them.

Tested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Merge topic 'link-line-dedup' into next

9f7e27fc De-duplicate shared library targets in generated link lines
Help: Add notes for topic 'link-line-dedup'
Merge topic 'link-line-dedup' into next

ccec6df8 Help: Add notes for topic 'link-line-dedup'