Test for reusing input written to buffer
Fix buffer overwriting issue when piping HDS stream

The HDS module uses “memoryview” objects, which are not “bytearray” objects,
but still need copying.

Simplify by always calling bytes() without checking the type of object. With
a “bytes” object input the time taken is still independant of the size of the
buffer:

Direct bytes() call: 1.8 µs (Python 3.3) or 0.40 µs (Python 2.7)
Instance check: 0.7 µs (Python 3.3) or 0.6 µs (Python 2.7)
Merge pull request #295 from vadmium/buffer

Fix memory overwriting issue caused by buffer rework