libgui: add helper to initialize CpuConsumer::LockedBuffer

Add CpuConsumer::lockBufferItem to lock a BufferItem and initialize
a LockedBuffer.

Test: libgui_test
Change-Id: I85fcc80acfc437d1f02d2310fbe194f1f0b98e7f
2 files changed