Merge changes Icb667451,Ie08d910b

* changes:
  Use template instead of macro to release UniquePtrs.
  Make usage of new/delete and malloc/free consistent.
tree: 716182964c16e93cf96cfa3d592f5b18306ee812
  1. keystore/
  2. keystore-engine/
  3. softkeymaster/