Count failed connections against max_connections to prevent endless looping.

Also:
- add a delay between tests in benchmark.sh
- add progress dots to the python test
- count failed imap connections correctly in the php test