Added a cache for attributes of user-provided objects
The attribute cache is now persisted across multiple evaluations of a
template. Resolves #31