Use triggers to keep tagxtag consistency.

This lesser maintenance as lot of code to deal with tagxtag has
been removed. It also ensure proper consistency in the database.

This makes the code cleaner and probably a bit more efficient.
Minor code optimization.