ETSBuffer is a simple buffer that stores a maximum of N events, keeping only the N events with the greatest sort keys.