core: add API to tag files, look up a file's id, and look up a file's tags.

You cannot currently tag a file that TMSU doesn't already have recorded in its database.