Refactor add/remove tag/collection code

Tested-by: Mark Somerville <mark@crocodile.is> [Arch, MRI 2.1.4, Chromium 38]
Signed-off-by: Mark Somerville <mark@crocodile.is>