Fix non-retained hostAddress in metadata.

hostAddress in SPDYMetadata had a typo and was using "assign" instead
of either "retain" or "copy". This could lead to crashes.

Also update all properties to be "nonatomic" and NSStrings "copy".
Fix redirects inside a WebView.

[NSURL initWithString:relativeToURL] produces odd results. The
URLs do not compare unless you examine the absolute strings, and when
going through a WebView on iOS8 the entire host gets stripped off. This
is not the case with iOS7. This fixes it by constructing a second NSURL
for the redirect based on the absolute string.

In addition, a 302 should behave like a 303 in that it rewrites a POST
as a GET. This is undefined in the HTTP spec but many user agents do
this, including it seems Apple's own in its HTTP stack as used by a
WebView. This was observed with Charles proxy, so this change makes
CocoaSPDY behave the same way.

Finally, when redirecting from a POST to a GET, the content-length and
content-type headers need to be stripped, as do all forms of body
content. Those headers are added automatically during canonicalization.
"SPDY", not "SDPY".
Merge pull request #90 from kgoodier/develop-next

Fix redirects and unretained metadata property.
Support for system-configured HTTPS proxies.

By default, enables support for HTTPS proxies that can be configured
in the system settings either manually or with an auto-config URL. If
the proxy connection fails, the system settings must be removed to go
back to direct connection.

Three new configuration settings are exposed for the app's use:
enableProxy, proxyHost, and proxyPort. These can override the default
behavior.

An HTTP proxy, as configured in OSX and iOS at least, means it serves
HTTP requests and operates transparently without a CONNECT message.
An HTTPS proxy serves HTTPS requests and requires a CONNECT message.
It does not use a TLS session between the client and the proxy itself,
but will obviously proxy a TLS session between the client and
origin after the CONNECT exchange.

HTTP CONNECT support is a requirement, not because of TLS, but because
we'll be sending non-HTTP data through the pipe following the CONNECT.
Users of CocoaSPDY remain free to use either HTTP or HTTPS requests.
There is no support for configuring a proxy in either OSX or iOS that
uses TLS between the client and itself, which would serve to encrypt
even the CONNECT message.

Connecting to an origin no longer means we simply connect to the origin's
host/port pair. If there is a proxy in between, then the host/port is
different. A SPDYOriginEndpoint represents the actual network host/port
being connected to in order to reach the origin. Also, there may be more
than one proxy that needs to be tried, if the first one fails. This
implementation is geared towards that in the future, but only actually
supports a single proxy. This simplifies a lot of code and supports all
known use cases. There is no fallback from a failed proxy to a direct
connection. All of these are purely future work items if demand
dictates.

All interaction with Apple's proxy configuration APIs is encapsulated
in SPDYOriginManager, and is done in a way to facilitate unit testing.

Resolution of proxy auto-config URLs requires a runloop, so we will
schedule the provided runloop source on the current runloop, and let
the caller provide a completion block to run once resolution is done.
When no proxy auto-config URL is found, then the completion callback
happens immediately on the current thread.

The socket connect / disconnect call patterns had to change. Previously,
connectToOrigin could fail immediately and return an error. Now, it
will never fail, and instead will use the willDisconnectWithError
callback. The connect timeout now includes proxy connect time.
DEBUG build logging should be synchronous.

Having logs happen asynchronous when debugging is annoying, and seems
to trigger false test failures, especially with iOS 7.1. So if no
shared logger is set, and it's a DEBUG build, then log on the current
dispatch queue. We still check the shared logger on the logging queue,
to prevent a small race.
Proxy-related code-review cleanup.
More proxy-related code-review cleanup.

From goaway and StanTwinB.
Added port to "Host" header in CONNECT.
Merge pull request #92 from kgoodier/review/http-proxy-pr

Support for system-configured HTTPS proxies.