Add support in the gralloc to: - Create a lock during buffer allocation. - Release a lock when the buffer is freed or unregistered. - Attach a lock when the buffer is registered. Change-Id: I788e411f43d5fcf88d7dcf39c530559a12d6361c