BufferedPipe: split into backend and frontend

The user will read and write from the frontend, while a hidden
backend proxies data in both directions to and from the real
device.

Signed-off-by: David Scott <dave.scott@citrix.com>