Add a text cache.

This change adds a canvas to the TextShape class so it can cache rendered text. This change renders text to this canvas when an application changes its parameters and copies it to the output canvas. (This feature is enabled only when TextShape.USE_CACHE is true.)