ENH: Set environment in try/finally

To avoid situations in wich the flag is not unset
Merge pull request #104 from GaelVaroquaux/safe_environment_flag

ENH: Set environment in try/finally
DOC: remove duplication in docstring

Fixes #102
FIX #105: fix race condition on iterable consumption with pre_dispatch