move get_rellinks and get_backlinks into util module

Otherwise the wiki.py module is very crowded.
Unify template handling under its own module.
fix bug in bag validator

we need to be able to edit the last bag in the quota limit.
Move augment_bag to util and flake8 cleanup

Trying to get some general cleanliness going on.
correctly fix bag validator problem