Added safety checks for OSStatus value returned by SecXXX functions

Our static analyzer is complaining about return values not being checked. Since aserts are disabled in Release builds these should probably be handled properly.