dirTagbox: Make matching case-insensitive

Fixes https://github.com/michaelbromley/angularUtils/issues/66
Also refactored into IIFE and named some anonymous functions.