Substrate recognition and catalysis by flap endonucleases and related enzymes.