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.

Fixes #437