Fixed conversion of Reference from pandoc metadata.

Changed String values in Reference and associated types to
Literal.  Added FromJSON instance for Literal that parses
arrays as [Inline] and then applies stringify.

Now e.g. math comes through to LaTeX unharmed. Previously
everything turned into a string in between.