Ticket #895
https://fedorahosted.org/pki/ticket/895
Further work on TPS Processor, format operation.
This patch gets a bit farther on the TPS format operation, just before applet upgrade,
which will also need secure channel functionality.
Also, patch provides some misc clean up and functionality.
1. Method to calculate the token type.
2. Some added convenience methods to get various config params for the Format operation.
3. More progress for the format operation up until we attempt to upgrade the applet.
4. Added TPSException that holds a message and end op return code. Can be used to throw
from anywhere and the return code makes it back to the client.
---