PDP8: Add device buffer flush capability and keep track of data written state in the device buffer.  Fixes #87