Support arbitrary URL prefixes for TrendMiner URLs

The URL prefix is determined by the URL_PREFIX setting in settings.py,
and currently set to 'trendminer'. Adding a leading and/or trailing
slash to the prefix is not necessary, but also won't break things.

---

Instead of hardcoded URLs, tests now use `reverse` function from `django.core.urlresolvers` to determine correct URLs.