fix(parser): Add caching to the dynamic parser.

This change cut memory allocations for some actions in the Todo
demo app by 50%.