Separate buffers for counter and non-counter deletes.

Also update a few subtle bugs with regard to deletes and add more test
cases.