This is an attempt to fix the processor initialization by adding a
factory method to build a Processor which will check the input arguments
consistency and build a Processor instance accordingly, or return a null
ptr and an error string. The Processor is only built if the arguments
are right. A few additional checks are added for the private keys.
This is based on D9368.