Revert "keystore: Fix build with gcc 4.7+ -Werror"

This reverts commit 4099ca750652118199c63467fe739c147a59aa26.
Add casts to avoid build warnings

Example:
keystore.cpp:1339:35: error: narrowing conversion of 'CommandCodes[0]'
from 'command_code_t {aka unsigned char}' to 'int8_t {aka signed char}'

Change-Id: I8cd239880821724050d1716b78851807e0246ef2
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>