Add Session method to merge environment settings with per-request settings

See also #2129