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).