Merged r13110 and r13112 from trunk to 2.4-stable (#16685)

introduce request_store to ensure that the current user doesn't leak across request boundaries.

Contributed by Holger Just.

git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@13114 e93f8b46-1217-0410-a6f0-8f06a7374b81