Simplify now that recent pandoc supports beamer

Since recent pandoc supports output to beamer this can be greatly
simplified. This even unbreaks a few issues with the older version (e.g.
related to `\verb` code blocks in special environments).