Throw InvalidKeyException when keystore key malformed

When a keystore implementation can't decode a key for some reason, throw
InvalidKeyException instead of RuntimeException. This will allow
applications to handle the error instead of crashing.

Bug: 20488918
Change-Id: I89215b5bc728ad1c266031bead940268025018a8
2 files changed