Added support for accounts and managing tags.

Added support for accounts and managing tags. Added supporting database
code for accessing and searching tags. Main code rev. 1777-1779