In test, compare getLocation() to localhost rather than mock-request-uri.

It’s not as easy as modifying $_SERVER anymore. This change may not be
viable, depending on what the request URI will contain.
Store entities correctly as event arguments.
testSave() in kernel test rather than web test.

It was moved to PastWebTest to utilise createUser(). That function is
now implemented also in PastWebTest.
Exception backtrace as string in argument test.

Swapped operants of the array plus operator, to overwrite [‘backtrace’]
correctly.