tags: implement tag folding and refactor code
The tag cloud is most useful if tags are counted in a
case-insensitive fashion.
Arrange to automatically lower-case tags by default.
However, any explicitly white-listed tags will have
the case of the white-listed entry used instead.
For example, if the tag "Git" was explicitly whitelisted
and tag folding (the new $Girocco::Config::foldtags option)
is enabled (it is by default) then adding any of the tag
names "git", "giT", "gIt", "gIT", "Git", "GiT", "GIt" or "GIT"
will all result in incrementing the same tag named "Git".
If tag folding is enabled and "Git" is NOT explicitly
whitelisted (the default) then any of those same eight tags
would end up incrementing the tag named "git" instead.
If tag folding is disabled then adding those eight different
tags will end up incrementing eight different tags (unless the
file system is case-insensitive).
As part of this change, the tag incrementing logic has been
moved from tagproj.cgi into a new Girocco::Project::add_ctag
member function to match the already existing delete_ctag
member function. Now tagproj.cgi calls add_ctag to add tags.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>