(pp-636) Remove header in inventory.txt when regenerating

The regenerate inventory wrote a header that was not there in the
original file.
(pp-637) Make cert inventory not rebuild inventory.txt when adding

There is a race condition that requires protection if the inventory
performs rebuild of a missing inventory.txt file when adding a cert.
Without the protection the inventory may end up with double entries or
missing entries, and with the protection the processing of cert requests
become serialized over all processors creating a performance problem.

This change simply appends to the inventory.txt - if the file does not
exists, it is atomically created.

A users that wants to recreate the inventory should do so with the
command `puppet cert reinventory` which may be executed on an
inactive system.
(maint) Refactor cert application's use of cert authority's interface

The code was difficult to understand as the cert application called
the apply function on the CertAuthority, which in turned created an
instance of the Interface class, which in turn called back into the
ca. As this construct was only used by the cert application, the ca's
apply method was moved to the cert application.

It is now more clear that the application interacts with the ca via
an instance of its Interface class.