Structures of DNA and RNA polymerases and their interactions with nucleic acid substrates