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.