Turn on flags for many more compiler warnings for client

This should further improve code quality.

Note the rules for the flags turned off are all
too nonsensical or difficult to follow.
Properly cast NSUInteger when used as string format arguments
Properly end source files with new-line's

C has such strange requirements.
Properly perform type conversions explicitly

Or change the type to match (ie. error codes).
Minor pragma syntax fix
Minor shadowing local variable fix
Fix minor comparison type mismatch
Merge pull request #27 from 3dna/peng/cleanup-4

Cleanup #4

By turning on more compiler warnings, some soft
parts of the client were discovered and hardened.