Be smarter about dirty checking cached vs. uncached.

Doing an || check makes boolean values, numeric values, and string values possibly behave incorrectly in the dirty checking code.
Merge pull request #77 from eventualbuddha/fix-boolean-attrs

Be smarter about dirty checking cached vs. uncached.