Fixing warnings again (tests passing)

Fixed a bunch of NSUInteger entityType = sqlite3_column_int64(statement, 1); because based on architecture, NSUInteger may be 32 bits or 64. long long is always 64 to get along with the sqlite3_column call

Fixed error dereference static analyzer warnings. We should never be passing error pointer as nil, but incase someone in the future does something naughty we will be protected.

Changed typeHash to return unsigned long to get along with format arguments. Functionally the same as its NSUInteger predecessor.