(PUP-2569) Revoke all certificate matching a given name

puppet cert revoke <name> was revoking only the first certificate
when the certificate file wasn't present on the system.
This patch makes sure all issued certificate matching a given name
are now revoked.

Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
(maint) Untangle fetching of serial numbers

The previous code contained a large number of assignments in passing
inside the conditional expressions. This caused it to need to use the
"and" operator, which should be reserved for control flow, to be used as
a boolean expression in order to avoid having the list of serial numbers
be a boolean as a result of precedence. This also resulted in the name
"serial" being used, when in fact it is now a collection of 0 or more
serial numbers. It also had the structure where the final array could
have been an array of arrays and so flatten needed to be used.

This straightens all of that out by ensuring that serials is always an
array and performing common error checking and handling of that.
Merge branch 'pr/2704'

* pr/2704:
  (maint) Untangle fetching of serial numbers
  (PUP-2569) Revoke all certificate matching a given name