Update mangler so it works in modern setuptools

The basic gist here is that we need to make sure the
namespace exists. Most straightforward way for that
is to import twp.utils.

It will take some practice to see if this is correct for
all situations, as well as to correct it in all plugins.
Correct handling of listing tags at /tags

The query parsing was incorrect. Add a test for it and
refactored the code so the data gathering was extracted to
its own unit.

fixes #101