This patch fixes an error condition where the PCKS#11 object is lost
afte multiple failures from the PKCS#11 device.
Without this patch Barbican can enter an error state where the PKCS11
object is deallocated and is unable to recover returning 500s until the
process is restarted.
(cherry picked from commit fa7722bfc5bb615d7d63ca8367b5c4b5e647d5d6)
(cherry picked from commit 3d3e00a92ac517f92847fb204406e898b663da08)
(cherry picked from commit 475074a47c09b54ef58e73fefafe5fcbf2d9c0f5)