simple, probably buggy, templated queue that uses a linked list internally.