functional queue

add fast implementation of functional queue and tests for it