Fixes a bug in TextShape caching.

TextShape.update always invalidated the cache, which has caused the severe performance issue.
Merge pull request #43 from mootoh/fix/textshape_cache

Fixes a bug in TextShape caching.