Update MKNetworkEngine.m

Fixes a retain block. In my application memory usage was spiking when enqueing alot of network events, this allowed alot of memory to be released. It may be superficial but I was under the impression self should not be used in blocks. But like i said maybe a coincidence.
Declare that MKNetworkOperation implements NSURLConnectionDataDelegate.

This allows subclasses of MKNetworkOperation to call those methods (e.g.
[super connectionDidFinishLoading:connection].
Add a new constructor that takes a port.

This adds initWithHostName:portNumber:apiPath:customHeaderFields: and
has initWithHostName:apiPath:customHeaderFields: call it in turn.

This allows callers to specify host and port in one step.
Make it possible to prevent the addition of the Accept-Language header.

This adds shouldSendAcceptLanguageHeader to MKNetworkEngine and
MKNetworkOperation (the value on Operation is set by Engine when the
Operation is created).

This defaults to YES, preserving the existing behavior.

If set to NO, then no Accepts-Language header is added to the request.
For API calls that are not language-dependent, this can save a significant
fraction of the request size, since the NSLocale preferredLanguages list
can be long.

This changeset moves the code to set the Accepts-Language header out of
MKNetworkOperation initWithURLString and into
connection:willSendRequest:redirectResponse:.  This is necessary because
NSURLConnection sets a default Accepts-Language: en-us header if you
try to omit it.  You have to explicitly delete it again before the
request is sent.
Implement MKNetworkOperation copyForRetry.

This copies the MKNetworkOperation, with the intention of retrying the call.
This means that the request parameters and callbacks are all preserved, but
anything related to an ongoing request is discarded, so that a new request
with the same configuration can be made.
Implement MKNetworkOperation addHeader.

This adds one single header, but otherwise acts like addHeaders.
Implement cancelOperationsMatchingBlock.

This cancels all operations in the shared queue for which the given block
returns YES.

cancelOperationsContainingURLString is now implemented in terms of
cancelOperationsMatchingBlock.
Implement setHeader.

Unlike addHeader, this will overwrite any existing header, rather than
appending to it.  This allows the use of customHeaders in MKNetworkEngine
as the default values, but overridden on a per-operation basis if necessary.
Removed the ability to continue when the SSL certificate is invalid if MKNetworkOperation.shouldContinueWithInvalidCertificate is set to NO

When shouldContinueWithInvalidCertificate is set to NO the library
should cancel the request if SecTrustEvaluate returns
kSecTrustResultRecoverableTrustFailure.
Merge pull request #341 from tclayson/master

Fix to issue where request is continued with an expired SSL certificate
Merge pull request #331 from tipbit/shouldSendAcceptLanguageHeader

Make it possible to prevent the addition of the Accept-Language header.
Merge pull request #327 from tipbit/NSURLConnectionDataDelegate

Declare that MKNetworkOperation implements NSURLConnectionDataDelegate.
Merge pull request #332 from tipbit/copyForRetry

Implement MKNetworkOperation copyForRetry.
Merge pull request #330 from tipbit/addHeader

Implement MKNetworkOperation addHeader.
Merge pull request #338 from tipbit/cancel-matching-block

Implement cancelOperationsMatchingBlock.
Fixed a queue leak
UIImageView now respects animation parameter
Merge pull request #311 from j-mcnally/patch-1

Update MKNetworkEngine.m
Merge pull request #333 from tipbit/init-with-port

Add a new constructor that takes a port.
Fixed a crash when decompressedResponseImage method is called on a network operation that is not a image at all.