Added a metadata property to all the exposed functions' return value.

In MMD, metadata is represented in the source as several lines like the
following:
Author : some guy
Title : super title

These key-value pairs aren't used for the HTML rendering, so were not
represented in the return values of the exposed function. Now the k-v pairs
are given in a JSON object attached to the return string/tree.

The JSON object which stores these attributes also contain metadata on
references, which is used for the internal parsing. having "reference" as a
key in the metadata might break the parsing (not tested yet).

I also wrapped some of the return values in a String object, to allow for the
metadata to be attached (you can't attach attributes to primitives in
Javascript). The only side-effect that I could find is that it breaks classic
string equality testing (String('foo')!='foo'). there is a compare
function(localCompare) that can be used however.