Merge pull request #1089 from davidpersson/optimize-net

Optimizing net related classes
BC Break, fixes JSON encoding & decoding for empty results.
Merge pull request #1090 from jails/bug/media

BC Break, fixes JSON encoding & decoding for empty results.
Coerce property earlier; refactor.
Refactor assignment of globals in action request; document.
Optimize Download shorthand header detection.

This change is in line with comparison when detecting the location header
in action\Response. Will now not detect `DOWNLOAD` or `dOwnlOAD` as the
shorthand header anymore.
Drop usage of temporary variables in action request.
Documenting header rewrite and body behavior.
Move documentation of PLATFORM env into env method docblock.
Document stream config option in response; and set default.
Explicitly pass $_FILES superglobal into method.
Formatting.
Formatting.
Deprecating `Download` shorthand header.

We should strive for as little magicness as possible. But when
we provide convience methods they should entirely cover the case.

With forcing content download there's already some additional preparation to do
which we also didn't catch here i.e. setting Content-Type to application/octet-stream.
When equalizing body and data; include parsed files.

Include optimization using assignment by reference.