(PUP-3564) Suppress empty pkg certificate warnings
Commit aae6e938 issued a warning if pkg list -Hn <name> returned lines
of the form /^Certificate/, but Array#select returns an empty array if
nothing matches, instead of nil. So the if cert_warnings condition was
always true, causing the pkg provider to issue messages of the form:
pkg warning: []
This commit checks for an empty array instead of nil, and adds tests to
ensure we only generate a warning when necessary.