Missing closing spans

For instance, you'd get that kind of output:
```html
<p><strong>This is a strong text</p>
```
Since the `<strong>` tag was never closed, browsers thought the rest of the page should be strong! Of course, this was happening for `<em>` and `<a>` tags too.
The values in the API were right, so this was a kit's issue (plus, the other kits were working fine on exactly the same documents); I reworked the span insertion entirely, to make it more trivial, clearer and better documented.