Generic and simple double buffer

This only provides [DoubleBuffer<T>], for implementing a double buffer pattern.