security: Support ECDSA verification in all related classes.

This commit also addresses some old issues, such as "using namespace std".

Change-Id: I62b8ff97fb2b6f6cfe04b0ad5866bc0797e6e43b
Refs: #1660
diff --git a/src/security/key-chain.cpp b/src/security/key-chain.cpp
index 69d5b48..9c5e000 100644
--- a/src/security/key-chain.cpp
+++ b/src/security/key-chain.cpp
@@ -122,6 +122,15 @@
     throw Error("TPM type '" + tpmName + "' is not supported");
 }
 
+KeyChain::~KeyChain()
+{
+  if (m_pib != 0)
+    delete m_pib;
+
+  if (m_tpm != 0)
+    delete m_tpm;
+}
+
 Name
 KeyChain::createIdentity(const Name& identityName, const KeyParams& params)
 {