Make absolute haddock paths proper URLs

Fixes #1064, #1406