core: add a generic interface for queues

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>