libtopo: add API for doing deep copy of a topo_list

Review Request #2470 — Created Dec. 10, 2019 and submitted — Latest diff uploaded


Libtopo provides a set of typedefs and interfaces for managing and iterating over doubly-linked lists (topo_list). This ticket to cover the work to add a new interface for making a deep copy of a topo_list.

This new interface is currently being leveraged by the tooling that is SAS topology project in illumos-joyent. That tooling exercises the new topo_list_deepcopy() interface. For example:

We're upstreaming this change as one of the prerequisites for upstreaming the larger pieces of the SAS Topology project.

See the ticket for additional testing notes: