add struct to replace parallel arrays

consolidate flushed & unflushed buffers
@normanmauer @trustin please review