auto merge of #18747 : csherratt/rust/ringbuf-remove-option, r=huonw
auto merge of #18747 : csherratt/rust/ringbuf-remove-option, r=huonw

Fix for task in Metabug #18009 (Rebased version of https://github.com/rust-lang/rust/pull/18170)

This changes much of about how RingBuf functions. `lo`, `nelts` are replaced by a more traditional `head` and`tail`. The `Vec<Option<T>>` is replaced by a bare pointer that is managed by the `RingBuf` itself. This also expects the ring buffer to always be size that is a power of 2.

This change also includes a number of new tests to cover the some areas that could be of concern with manual memory management.

The benchmarks have been reworked since the old ones were benchmarking of the Ring buffers growth rather then the actual test.

The unit test suite have been expanded, and exposed some bugs in `fn get()` and `fn get_mut()`

## Benchmark
**Before:**
```
test ring_buf::tests::bench_grow_1025                      ... bench:      8919 ns/iter (+/- 87)
test ring_buf::tests::bench_iter_1000                      ... bench:       924 ns/iter (+/- 28)
test ring_buf::tests::bench_mut_iter_1000                  ... bench:       918 ns/iter (+/- 6)
test ring_buf::tests::bench_new                            ... bench:        15 ns/iter (+/- 0)
test ring_buf::tests::bench_pop_100                        ... bench:       294 ns/iter (+/- 9)
test ring_buf::tests::bench_pop_front_100                  ... bench:       948 ns/iter (+/- 32)
test ring_buf::tests::bench_push_back_100                  ... bench:       291 ns/iter (+/- 16)
test ring_buf::tests::bench_push_front_100                 ... bench:       311 ns/iter (+/- 27
```
**After:**
```
test ring_buf::tests::bench_grow_1025                      ... bench:      2209 ns/iter (+/- 169)
test ring_buf::tests::bench_iter_1000                      ... bench:       534 ns/iter (+/- 27)
test ring_buf::tests::bench_mut_iter_1000                  ... bench:       515 ns/iter (+/- 28)
test ring_buf::tests::bench_new                            ... bench:        11 ns/iter (+/- 0)
test ring_buf::tests::bench_pop_100                        ... bench:       170 ns/iter (+/- 5)
test ring_buf::tests::bench_pop_front_100                  ... bench:       171 ns/iter (+/- 11)
test ring_buf::tests::bench_push_back_100                  ... bench:       172 ns/iter (+/- 13)
test ring_buf::tests::bench_push_front_100                 ... bench:       158 ns/iter (+/- 12)

```

carols10cents/rust,hauleth/rust,mvdnes/rust,zachwick/rust,kimroen/rust,jashank/rust,philyoon/rust,defuz/rust,seanrivera/rust,l0kod/rust,zubron/rust,miniupnp/rust,AerialX/rust-rt-minimal,rohitjoshi/rust,l0kod/rust,vhbit/rust,quornian/rust,cllns/rust,graydon/rust,ktossell/rust,AerialX/rust,mvdnes/rust,zubron/rust,nwin/rust,kwantam/rust,AerialX/rust-rt-minimal,andars/rust,kimroen/rust,andars/rust,nwin/rust,mahkoh/rust,rprichard/rust,kimroen/rust,l0kod/rust,philyoon/rust,XMPPwocky/rust,ktossell/rust,victorvde/rust,dinfuehr/rust,l0kod/rust,jashank/rust,zaeleus/rust,richo/rust,mihneadb/rust,philyoon/rust,GBGamer/rust,miniupnp/rust,ktossell/rust,dinfuehr/rust,sae-bom/rust,GBGamer/rust,dwillmer/rust,ejjeong/rust,ruud-v-a/rust,rohitjoshi/rust,gifnksm/rust,kimroen/rust,TheNeikos/rust,AerialX/rust-rt-minimal,aidancully/rust,0x73/rust,0x73/rust,ktossell/rust,hauleth/rust,dwillmer/rust,sae-bom/rust,l0kod/rust,robertg/rust,avdi/rust,richo/rust,untitaker/rust,ruud-v-a/rust,AerialX/rust,nwin/rust,GBGamer/rust,aepsil0n/rust,carols10cents/rust,rprichard/rust,defuz/rust,graydon/rust,victorvde/rust,quornian/rust,ruud-v-a/rust,nwin/rust,reem/rust,aidancully/rust,mdinger/rust,quornian/rust,emk/rust,reem/rust,kwantam/rust,ejjeong/rust,defuz/rust,zaeleus/rust,zaeleus/rust,zachwick/rust,richo/rust,emk/rust,AerialX/rust,aepsil0n/rust,jashank/rust,mdinger/rust,GBGamer/rust,robertg/rust,dwillmer/rust,robertg/rust,bombless/rust-docs-chinese,emk/rust,sae-bom/rust,vhbit/rust,philyoon/rust,quornian/rust,XMPPwocky/rust,mihneadb/rust,hauleth/rust,bombless/rust,pshc/rust,AerialX/rust-rt-minimal,gifnksm/rust,andars/rust,mvdnes/rust,zaeleus/rust,ktossell/rust,0x73/rust,defuz/rust,zachwick/rust,KokaKiwi/rust,vhbit/rust,mvdnes/rust,krzysz00/rust,jroesch/rust,bombless/rust,0x73/rust,carols10cents/rust,dwillmer/rust,GBGamer/rust,mahkoh/rust,hauleth/rust,0x73/rust,hauleth/rust,nwin/rust,ebfull/rust,aepsil0n/rust,rprichard/rust,untitaker/rust,mdinger/rust,jroesch/rust,vhbit/rust,zubron/rust,aneeshusa/rust,cllns/rust,victorvde/rust,seanrivera/rust,mahkoh/rust,kimroen/rust,dinfuehr/rust,pshc/rust,hauleth/rust,rohitjoshi/rust,gifnksm/rust,robertg/rust,ruud-v-a/rust,andars/rust,pelmers/rust,jroesch/rust,carols10cents/rust,jroesch/rust,vhbit/rust,jashank/rust,graydon/rust,jroesch/rust,gifnksm/rust,carols10cents/rust,GBGamer/rust,kwantam/rust,zachwick/rust,mahkoh/rust,pshc/rust,carols10cents/rust,avdi/rust,miniupnp/rust,mihneadb/rust,XMPPwocky/rust,seanrivera/rust,zubron/rust,quornian/rust,bombless/rust,gifnksm/rust,zachwick/rust,avdi/rust,zubron/rust,AerialX/rust,ejjeong/rust,pshc/rust,seanrivera/rust,emk/rust,aneeshusa/rust,pshc/rust,victorvde/rust,zubron/rust,vhbit/rust,vhbit/rust,richo/rust,mdinger/rust,reem/rust,sae-bom/rust,dinfuehr/rust,nwin/rust,XMPPwocky/rust,reem/rust,kwantam/rust,mdinger/rust,rprichard/rust,graydon/rust,jroesch/rust,AerialX/rust-rt-minimal,emk/rust,andars/rust,aepsil0n/rust,miniupnp/rust,TheNeikos/rust,AerialX/rust-rt-minimal,aneeshusa/rust,miniupnp/rust,aneeshusa/rust,AerialX/rust,avdi/rust,pelmers/rust,kwantam/rust,dwillmer/rust,XMPPwocky/rust,KokaKiwi/rust,richo/rust,pshc/rust,reem/rust,gifnksm/rust,omasanori/rust,l0kod/rust,TheNeikos/rust,rprichard/rust,untitaker/rust,kimroen/rust,rprichard/rust,nwin/rust,GBGamer/rust,KokaKiwi/rust,TheNeikos/rust,omasanori/rust,pelmers/rust,kimroen/rust,krzysz00/rust,krzysz00/rust,aidancully/rust,dinfuehr/rust,ktossell/rust,pshc/rust,ebfull/rust,aidancully/rust,aidancully/rust,untitaker/rust,pelmers/rust,untitaker/rust,ruud-v-a/rust,TheNeikos/rust,graydon/rust,robertg/rust,zachwick/rust,0x73/rust,aepsil0n/rust,mdinger/rust,mvdnes/rust,KokaKiwi/rust,kwantam/rust,ejjeong/rust,dwillmer/rust,bombless/rust,dinfuehr/rust,mihneadb/rust,quornian/rust,nwin/rust,rohitjoshi/rust,mahkoh/rust,dwillmer/rust,cllns/rust,avdi/rust,rohitjoshi/rust,philyoon/rust,omasanori/rust,ebfull/rust,jashank/rust,GBGamer/rust,jashank/rust,omasanori/rust,jroesch/rust,ebfull/rust,l0kod/rust,krzysz00/rust,XMPPwocky/rust,ruud-v-a/rust,AerialX/rust,ebfull/rust,pelmers/rust,omasanori/rust,miniupnp/rust,bombless/rust,emk/rust,miniupnp/rust,jroesch/rust,cllns/rust,cllns/rust,TheNeikos/rust,zaeleus/rust,pshc/rust,seanrivera/rust,aepsil0n/rust,pelmers/rust,defuz/rust,aidancully/rust,avdi/rust,jashank/rust,victorvde/rust,ejjeong/rust,mihneadb/rust,dwillmer/rust,miniupnp/rust,KokaKiwi/rust,mvdnes/rust,robertg/rust,mihneadb/rust,cllns/rust,quornian/rust,ejjeong/rust,victorvde/rust,emk/rust,aneeshusa/rust,zubron/rust,aneeshusa/rust,philyoon/rust,zaeleus/rust,rohitjoshi/rust,l0kod/rust,untitaker/rust,andars/rust,vhbit/rust,omasanori/rust,sae-bom/rust,reem/rust,0x73/rust,defuz/rust,krzysz00/rust,sae-bom/rust,ebfull/rust,bombless/rust,ktossell/rust,seanrivera/rust,graydon/rust,mahkoh/rust,jashank/rust,richo/rust,krzysz00/rust,KokaKiwi/rust,zubron/rust