Provide more context variables in update scripts

In addition to `_source`, the following variables are available through
the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`,
`_parent`, `_timestamp`, `_ttl`.

Some of these fields are more useful still within the context of an
Update By Query, see #1607, #2230, #2231.
Allow configuration of the GC log file via an environment variable

The environment variable ES_GC_LOG_FILE contains the full path to the GC log file, all referenced
directories must already exist. If the variable is not set but GC logging is requested via ES_USE_GC_LOGGING
then the log file will be written to $ES_HOME/logs/gc.log

Closes #8471