comm: fix build

It's no longer possible to have a Box&lt;Buffer&gt; due to the new object
safety rules. Wrap in an enum as a workaround.

Fixes #437

shuf (still broken) has a similar problem with rand::Rng.
Looks like `self.read_line()` (without `match`) just works.