Add test case for tag inheritance

This reproduces the problem in #519.

Part of #519.
Fix tag inheritance

The big after trigger on the ip_net_plan table didn't trigger on changes
to the tag or inherited_tags column which broke tag inheritance. Now
fixed!

Fixes #519.
Merge pull request #547 from plajjan/519-tag-inheritance

Fix tag inheritance