1077 reactor restart

Problem description
===================

This is another try to have a common code for Python 2.5 and Python 2.7


Changes description
===================

A socket select error only raised in 2.7 is handled in MockHTTP server.

Twisted reactor execution was updated with API closer to that used in normal run.


How to try and test the changes
===============================

reviewers @alibotean 

There is  another branch on the server with full tests.

All tests should pass without complaining about unclosed threads at the end.