templated double-linked list,using small memory pool.