MB-10088: improved generate_cert to create CA-signed certificates

There are command-line flags and test script testing/exercising this
feature.

Change-Id: I90ff732e2341f3f5e54e065aff8eef82179b4c71
Reviewed-on: http://review.couchbase.org/33228
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
Tested-by: Artem Stemkovski <artem@couchbase.com>