Lukasa/hyper — pull request #39 by alekstorm (2014-04-07 00:22:22+00:00)
Title: Refactor Stream to ensure header blocks are decoded in the correct order

Previously, incoming frames were placed on per-`Stream` queues, which were read from lazily, i.e. whenever `HTTP20Response.getheaders()` or `.read()` were called. However, the HPACK algorithm depends on header blocks being encoded/decoded in the same order on both sides of the connection; otherwise, the codec states on each peer will get out of sync.

This PR rearranges header decoding by moving it from `Stream.getresponse()` to `Stream.receive_frame()`, which is executed on the `Connection`'s event loop. `DATA` frame receiving was refactored in a similar way for consistency.