Refactor: Divide Peer responsibilities between server and client.

Code is still really ugly.
Refactor: Challenge/response.
WIP: More refactoring
Wrap OS X specific code in #ifdef
Sanitize public vs for-subclass code.
Sanitise headers.
Project cleanup.
Added iOS Testbed. Re-orgnised test beds.
Handle “already closed” errors properly.
Fix broken plist ref.
Misc fixes

Fix runtime errors due to missing setMode.
Clean up message handling a little - still want to do a big refactor.
Put requires challenge behind a flag.
Propagate sock errors.
peer HAS to be a serverPeer
set challenge to true
and log the code for convenience sake during development
Correctly change state once the secret is successful.
Use correct error domain.
Re-share schemes.
Fix error codes.
Make an “all” target.
Merge branch 'refs/heads/master' into jwight/refactor
Fixed missing headers.