Fixes #20248, #20327 - Respect context in CSV export
Since CSV export is done using an enumerator which is executed by a different thread to the one that creates it, we need to manually pass in the context (user, location, organization) to the enumerator.
(cherry picked from commit c8f5cd53b3551867e54aedd24116293b0e2312d1)
Related issues
Bug #20248: Exporting list of all hosts into a CSV file won't insert Environment, Hostgroup and Model information
Bug #20327: Configuration Management Reports csv export does not respect org/loc context
Fixes #20248, #20327 - Respect context in CSV export
Since CSV export is done using an enumerator which is executed by a
different thread to the one that creates it, we need to manually pass in
the context (user, location, organization) to the enumerator.
(cherry picked from commit c8f5cd53b3551867e54aedd24116293b0e2312d1)