[compositor] Release SHM buffers as soon as they are uploaded.

This gives a pretty good performance boost for clients
with only two SHM buffers.