NOTE:  This version of the patch applies the fixes previously requested:
Comments: 
1. As noted, please open trac ticket to remove custom args from the
command line from pkispawn, and add -i instance mandatory parameter to
pkidestroy.

2. In pkihelper, you add logic that separates out the case of the
subordinate CA because subordinate is not defined for any subsystem
other than a CA.  You could leave it in the same conditional, and
simplify the conditional to be: if (clone) or (!ca) or (subordinate):

3. Please shorten the name of
util.namespace.pki_instance_name_collision_detection_avoidance()

You can make those changes and check in without re-review.  As long as
you test of course to confirm you have not broken anything.

Ade

This patch documents continued implementation of the PKI Deployment Framework based upon the revised filesystem layout documented here:
This patch addresses the following issues:
WARNING:  As this patch does fundamentally change instance names from "[pki_admin_domain_name-]pki_instance_name" to "pki_instance_name[.pki_admin_domain_name]", users of this patch must FIRST remove all old PKI instances.