security: fixing bugs and adding methods

1. changing getCertificate to take only one argument, now validation checking is always enforced.
2. changing KSK-... DSK-... to lower case ksk-..., dsk-...
3. adding a addCertificateAsSystemDefault method to facilitate setting default certificate of the system.
4. using static_cast<int> (rather than floor) to round time.
5. sanity checking for key name in SecPublicInfo and SecPublicInfoSqlite3.

Change-Id: Id67af9873efef3df92458ed7a87623f22167c558
security: bug fixing

1. it should be Info::addPublicKey rather than Tpm::addPublicKey
2. we do not need to refreshDefaultCertificate after setDefaultKeyNameForIdentity() which has already refresh the default certificate.

Change-Id: I73d0798544124f7198416a9b14bb4fd9ff8ef2b0
security: add key name sanity checking in KeyChain::selfSign

Change-Id: I2693fd9cf780a52af44b778d828069b5d01b8e8b