Fix test suite on travisci

Bascially this PR fixed build at the travisci.

Just be aware about few things:

* I need to skip  testWhitelistedDocumentTypesAreAllowed() test for some version of php cause of  https://bugs.php.net/bug.php?id=67081 It seems that serializer rely on some invalid php behavior which was fixed in newer version of php (>= 5.5.13 and >= 5.4.29). I don't know how to fix this in code, if someone have idea feel free to comment and help me :)
* Library support php 5.3 as we can see in travis.yml - so I need to fix code like `$this` usage in anonymous functions.

Give me know if this PR is acceptable, if yes I can squash commits.
but it requires downloading 14 or 15 more packages for each build, making the composer installation slower while composer is still there.

And anyway, if you decide to add the dependency, it should be ``~4.1``, not ``4.1.*``, so that a ``composer update`` can select newer minor versions when they are released (which would be the case now that 4.2 is stable since a few weeks)