comm: fix build

It's no longer possible to have a Box<Buffer> due to the new object
safety rules. Wrap in an enum as a workaround.

Closes #437

shuf (still broken) has a similar problem with rand::Rng.