This helps fix some wrapping issues and mapping down counter space to
buffer space. Essentially if the size of the buffer isn't a power of
two, then it breaks the counter space up into uneven chunks. So when
mapping to the buffer space the indexing gets off when the counters wrap
around.
This is a big change. Initially items added to the RingBuffer needed to
have a Default implementation. This nessecitated the use of Copy.
However, by doing so the RingBuffer was not able to store non-Copy types
like String or Vec.
To allow for this change the buffer switched from using Default to
initialize the array to using MaybeUninit and UnsafeCell to initialize
the array and write to or read the memory location with interior mutability.
This means that the atomics are now the definitive guards like was
initially desired and the mutable reference needed for push and
pop could be removed.
Drop was added to clean up the items in the array now that they may need
to be dropped themselves.
Some convinence functions were added for users to get information about
the RingBuffer.
Really it doesn't have channels so the only advanced thing was the
dynamic trait part. Pinning the futures is only real hard part to
this module. The rest does show trait implementations on structs though
which was something missing from the library before.
Also, the project was turned into a library and the foundational
examples were put into a basic module.