Fix Document#asHtml (with links in StructuredText)

LinkResolver was only provided to DocumentLink, so
links nested in a StructuredText (for instance)
didn't receive it.
Provided linkResolver can now be a function

The LinkResolver can (and is) now used as a function,
so if an actual function is provided instead of it,
the code will code as expected.

The LinkResolver class is still useful:

  - to be used as an helper
  - because closures are not fully supported