Refactor the link-tracking code and move it from framework.

This code has a dependency on SiteTree, so it fits much better in the
cms module.

Abstracted away the content parser so the same code can be reused both
in the render phase (to highlight the links) and in the write phase
(storing information about broken links and references).
`if` on the same line as `foreach` isn't best practise. Maybe something like this instead:

```
$links = $htmlValue->getElementsByTagName('a');
if(!$links) return $results;

foreach($links as $link) {
...
```