Add isCached field (inside an env) and unpersist().

Maintaining an `isCached` field is useful for implementing pipelining.