medfilt: use unsorted queues with small kernels