Limit packet payload to 512 bytes.

- Limits the size of pipeline packets to 512 bytes. Fixes #16.
- Adds a test to verify that pipelines are cleaned after send().