Queue: implement a maximum number of slots for the queue

This closes issue #5

Signed-off-by: Kai Blin <kai@samba.org>