* Don't represent SRDelegateAvailableMethods as a bitfield
Since Objective-C uses a signed char for BOOL on some platforms (macOS and 32-bit iOS) packing this into a bitfield doesn't work since when it tries to read the field it looks for the sign bit and fails with an EXC_BAD_INSTRUCTION. This change sacrifices a few bits for the extra portability.
* CR - followup
Oh boy. Here's a controversial change.

Let's give a bit of backstory.
A few weeks ago, Facebook was contacted by a whitehat hacker (the good
guys) about a security vulnerability here in SocketRocket.
For those of you who are truly interested in what that security flaw
was, it is essentially the same flaw as outlined here:
https://www.synopsys.com/blogs/software-security/ineffective-certificate-pinning-implementations/
So, we were faced with a choice - quietly push out a patch, and hope
that eventually existing applications updated, or be transparent and
admit we screwed up.
This is us admititng we screwed up. And while yes, we could probably fix
the implementation. But we talked internally, and decided that the best
approach here is to completely remove the option for pinning.
For all of our existing users that use certificate pinning, while we
understand that in the past there has been a very large barrier to entry
with getting a CA to issue a certificate.
However, since the rollout of CAs like LetsEncrypt, there's become an
ever-dwindling reason to actually use self-signed or unsigned
certificates.
For this reason, we're going to go ahead and deprecate the APIs that
allow SSL pinning and disabling trust chain verification. The pinning
APIs are now going to throw an exception when invoked, and the trust
chain APIs have deprecation warnings.
If you are a user of these APIs, and you for some reason **CANNOT** use
a trust chain validated certificate, PLEASE speak up. While we cannot
think of any reason to use those kinds of certificates, it's entirely
possible we overlooked something. We'll leave this pullrequest unmerged
for a two week period (Monday, August 28th, 2017), at which point,
unless we have feedback convincing us otherwise, we will go ahead with
this change.
Extract @fredericjacobs' CertificateVerifier concept with @nlutsenko's
SRSecurityOptions into a pluggable SRSecurityPolicy model
This retains existing SSL configuration code paths, while allowing users
more flexibility to specify their own security policy.
If you are alread using AFNetworking and an `AFSecurityPolicy`, it's
intended that you can share domain trust logic by delegating
`SRSecurityPolicy evaluateTrust:ForDomain` to your AFSecurityPolicy
instance.
Inspired by original "Require TLS 1.2 & enable pinning" pull request by
Frederic Jacobs (@fredericjacobs) at:
https://github.com/facebook/SocketRocket/pull/274/files
CI is currently failing because the default ruby on travis.org is 2.0,
but a dependency xcpretty, requires the latest activesupport, which
requires ruby >=2.2
* Reduce memory usage
Reduce memory usage by discarding, not resetting, the frame data buffer.
Let delegate control copying.
* Delegate methods expect `self`
* Add `-sendWithoutCopyingData:error:`
* Add `-webSocket:shouldCopyReceivedData:`
* Update test script name in Makefile
* use a Swiftier name
* Fix error messages
* Remove `-webSocket:shouldCopyReceivedData:`
* Remove assertion
* Fix typo