Fixed PHP-706: Replace select() with poll() for network time-outs

This is only in effect if streams are disabled.
Patch by Taneli Leppä.
Be a bit more clever about whether we have streams compiled in.

This is necessary to be able to skip tests that require streams.
Fixed test cases as as well as error codes for timeouts.
Fixed test cases.
Remove the change to the compile script as we want streams enabled on Travis.
Merged pull request #464