Change `set.append` -> `set.add` in `headerid.unique`

Fixes #195. This was getting missed because the HeadrerId extension's
reset method was resetting the IDs to a list. However, some third party
extensions may want to call the unique function and it should work as
documented. Interestingly, the TOC extension was using it and passing in
a list as well. All fixed now. Also added a test of the `unique` function
directly so we shouldn't repeat this in the future.
Merge branch 'master' of https://github.com/waylan/Python-Markdown