Fixes defaulting behavior in tag for caching purposes.

Previously, Tag.getTag, Tag.getProgramTag, and Tag.getBooleanTag all
handled their own defaults (sometimes incorrectly).  In other news, the
caching code doesn't work very well when storing a cache key of None; in
particular it will always ignore the cached value.

The bug in tags caused us to hit the caching issue in None more often.
Since the bug in caching is somewhat harder to fix, this commit does the
easy fix in tags, which will in practice significantly reduce the effect
of the caching bug.

Todo: fix the actual caching bug (I'll make an issue for it).
Fixes bugs in ArgCache handling of None.

Now ArgCache will corrrectly hit the cache if the cached value is None.

The gory details:

This does it by using a special value, CACHE_NONE, and comparing against
that.  We could use some garbage string, but that's ugly, so we use an
empty dict, and as long as we compare against the *same* empty dict, by
id, it will work just fine, and there is no possibility of an error if
someone decides to cache the value 'adfskjalkfdjslk'.

All current APIs should work.  If you are calling ArgCache.get()
directly, you will still fail to cache values of None; replace your
    val = self.get(key)
    if key is None:
with
    val = self.get(key, self.CACHE_NONE)
    if key is self.CACHE_NONE:
The old API should still work, it will just miss the cache when it
shouldn't.  We don't think this even happens anywhere, so it should not
be a concern unless you're messing with ArgCache.
Some more little fixes to the defaulting behavior of getProgramTag.
One more tiny fix to tag defaulting, and a small fix to setTag.

First, there was still incorrect default checking in getProgramTag.
Second, the default check in getBooleanTag was testing object identity
rather than equality, which may not work if we are getting back our
default, but getting it from the cache.  I think testing equality is
both safe and sane.

Third, setTag was acting incorrectly if you were trying to set a tag
with no target, and there was already a tag set with a target.

The tests that caught most of these issues will be in a separate commit
coming soon to a git tree near you.
Adds more tests for tags.

In particular, adds tests for tag defaulting and caching behavior, and
in particular for getProgramTag and getBooleanTag.

Note that the caching test is set up to ignore the bug of Issue #866;
when/if that issue is closed, the marked lines may be removed.  This
isn't an ideal solution, but I think it's better than committing a test
that will be failing for the near-term future (and thus is useless),
since I don't want to assume that a deep argcache bug will be fixed
soon.
Adds and updates some docstrings for the tests.
Changes getProgramTag's defaulting to improve performance.

Once the underlying issues with argcache were fixed, getProgramTag's
defaulting behavior actually made more sense as something closer to the
way it was, since getTag returns None if and only if the tag was not
found.  Passing None as a default rather than passing our default down
therefore has the same behavior, but improves caching performance.
Removed a bunch of getTags in testProgramTag.

Since their behavior should be tested elsewhere, and they might cause
caching bugs not to get noticed.
Merge pull request #810 from learning-unlimited/cache-none-fixes

Fixes defaulting behavior in tag for caching purposes.