[#3714] Fix issues with 5.3.3 polyfills

- When installing the entire framework, the `autoload.files` of
  `composer.json` are sorted alphabetically. This causes an issue, as
  the `Zend\Session` polyfill depends on the `Zend\Stdlib` polyfill.
- When installing the components separately, they are sorted based on
  dependencies, and thus the require statements happen in the correct
  order.
- The solution presented here is to test if (a) the polyfill class is
  already declared, and (b) if not, attempt to load the polyfill based
  on the known directory structure.
Merge commit 'refs/pull/3714/head' of github.com:zendframework/zf2

PR #3714