[#1077] Refactor reactor restart to use public API.

trac:1077 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.