Implement a few methods for RingBuf

Part of collections reform part 1 and 2, #18424 and #19986

* shrink_to_fit
* swap_back_remove
* swap_front_remove
* truncate
* resize
Would also appreciate each one of these be labeled, if possible. In this case something like "entire contents are out of desired bounds".