Adds a Data class to use with DequeBuffer, using unique_ptr now.
Fixes a bug where the write lock was released too early.

Signed-off-by: Mathias Garbe <mail@mathias-garbe.de>