prefer the leftmost even if the end of either match has not
yet been completed. If two matches start on the same state,
prefer an uncompleted end to a completed one.
Fixes issue #229.
They can be close()d explicitly with close-file-descriptor, and
will close() on gc, but only explicitly closing the last port on
them will close the fileno. Notably needed for network sockets
where we open separate input and output ports on the same socket.