Fixes to Mac port

Fixed compilation when CLIENT_API_KEY is not defined.

Fixed mixing of data from different apps by including the appId in the
name of the cache files.

Fixed issue with "class" being treated as a reserved word (in
[Amplitude isArgument])