consider certificate with 0 valid entries - malformed
consider certificate with 0 valid entries - malformed

because public_key:pem_decode/1 returns empty list if you supply
complete junk as an input

Change-Id: I9e8008018cd82da593c07be5f9cdcb56df776ba6
Reviewed-on: http://review.couchbase.org/63052
Tested-by: Artem Stemkovski <15a0730a27c69f62ab86f2b6c639fca202166c02@couchbase.com>
Reviewed-by: Aliaksey Artamonau <3c875bcfb3adf2a65b2ae7686ca921e6c9433147@gmail.com>

membase/ns_server,membase/ns_server,ceejatec/ns_server,membase/ns_server,ceejatec/ns_server,ceejatec/ns_server,membase/ns_server,ceejatec/ns_server,ceejatec/ns_server,ceejatec/ns_server,membase/ns_server,membase/ns_server