Change the bufcstr function's prototype

Since we are only using this method inside a callback under the hood
(i.e. `header_anchor`) and we are dealing with const-qualified buffers,
let's change the method's prototype in order to avoid warnings.
Rewrite anchor generation in pure C

In order to make port to other languages easier and for the sake of
fastness, let's rewrite the anchor generation without the Ruby C API.

The necessary code is pretty straightforward. We need to remove any
extra white spaces and down-case the whole string. Then we can replace
spaces with dashes.

As for the stripping of inline HTML elements, we just need to rely on
`strtok` that will tokenize the string according to either the opening
or closing chevron (< or >). Thus, once every two times, the yielded
token is the content of a HTML tag, so we don't need to copy it to the
output string.
Move the regression test regarding extra spaces

This regression test should be gathered with the other HTML_TOC's ones.
Merge pull request #426 from vmg/toc-anchors

Rewrite anchor generation in C