(PUP-1665) Fix traversal of signed certs when listing signing requests.

With 'puppet cert list', the output is expected to be the list
of hosts with outstanding signing requests.

However, the implementation still gets the list of signed certificates
and traverses this list in an O(N) fashion for each host being returned.

Since we know the list of hosts is limited to only signing requests
in this case, this traversal is entirely unnecessary and it impacts
performance when there are a large number of signed certificates.

The fix is to only traverse the list of signed hosts when --all,
--signed, or a list of hosts was given on the command line.
Merge branch 'pr/2349'

* pr/2349:
  (PUP-1665) Fix traversal of signed certs when listing signing requests.

This closes GH-2349.