Add spec for Enumerator lifecycle (finalization). Fixes #1076.