propperly handle 0-length keychain items of type kSecClassKey

Keys whose length is 0 cause segfaults when requesting the following properties:
kSecAttrIsPermanent
kSecAttrCanEncrypt
kSecAttrCanDecrypt
kSecAttrCanDerive
kSecAttrCanSign
kSecAttrCanVerify
kSecAttrCanWrap
kSecAttrCanUnwrap
This commit insures that only those keys with a kSecAttrKeySizeInBits greater than 0 requests any of the above attributes.
add sign command to Makefile to allow for building and signing directly on IOS devices

Sign uses the ldid tool to sign the keychain_dumper binary.
This allows for signing and running keychain_dumper, even if one does not have a Mac and the codesign tool.
detect on-iphone compilation and adjust args accordingly, fix ldid to use $BIN

If compiling on the iPhone platform, the -arch option causes gcc to fail.
This commit checks the type of the compiling machine using uname -m, and removes the -arch argument if it finds the string "iphone" in the result of
said check.
Also fix the sign command to use the $BIN path when calling ldid.