add HistoryBuffer#end_of_buffer and refactor pusher