[#3376] Better fix

- The main point is that we ensure hasItems() internally calls
  internalHasItem(). As such, removing the multiple keys ensures we
  don't have issues with index order of mock objects. Test now passes on
  both 3.7.12 and 3.7.13, on all PHP versions used.
Merge branch 'hotfix/3376'

Backport #3436 to master
Updated session manager to register_shutdown_function rather than a destructor

- Fixed an issue where an exception was not properly defined in use
- Fixed a flash messenger test by clearing session storage on teardown
- Removed a no longer valid test on sessionmanagertest

Conflicts:
	library/Zend/Session/Storage/SessionArrayStorage.php
Allow injecting session manager into PRG plugin

- which allows creating the internally used Container with the specified
  session manager
- neither FM and PRG should instantiate a SessionManager directly; they
  should use the default manager from the Container class
CS cleanup of PRG plugin

- Created docblock for __invoke() method
- Removed an else condition that would not be hit if the if condition is
  evaluated.
Fix issue with imports

- An import of "use Zend\Session\Storage\StorageInterface as Storage" caused a
  subsequent, existing check of "instanceof Storage\StorageInterface" to thus
  fail. Removed all imports for classes in the same namespace to fix the issue.
Forward #3452

Conflicts:
	library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php