New IO manager based on gevent.

It should be a drop-in replacement for AsyncLibrary, although it
still requires proper testing, with the exception of threaded RPC,
which are not supported anymore (in a certain way, now all RPC are
"threaded", because they're executed in a dedicated greenlet; yet,
at the moment requesting a threaded RPC triggers an error).

So far there is not Web counterpart.
Migrate Checker to GeventLibrary.

Whoo, apparently it works! :-)
Migrate EvaluationService too.

And this too appear to be working perfectly! :-)
Factor the Tornado application through a WSGI interface.

This commits actually makes *WS slower and in theory less powerful.
It is only a "just-because-we-can-commit", in order to check whether
our current code factors well through a WSGI interface.

Of course this doesn't involve RWS: it is known that RWS doesn't
factor well through a WSGI interface.
Add support for WebService to the gevent-based IO framework.
Migrate AdminWebServer to WebGeventLibrary.

Unfortunately there appear to be problems with Web RPC requests.
Fix Web RPC execution in WebGeventLibrary.

Classes imported from WebAsyncLibrary referenced the wrong
WebService class.
Migrate also ContestWebServer to WebGeventLibrary.

Things mostly work; but we have to eliminate all asynchronous
requests which are not supported via the WSGI interface (and not
required anyway, given that now requests have their nice
dedicated greenlet).
Integration between psycopg2 and gevent.

At last our database queries are non blocking!
Patch *WS so that all requests are handled synchronously.

The patch is rather quick and dirty (although not inefficient).
It will require some more care later, but now I'm concerned with
making things work.
Method to undo make_psycopg_green().
Make a couple of shutil methods nice towards gevent.
Avoid using green psycopg when dealing with large files.

Since psycopg (and actually libpq) doesn't support it.
Fix some PEP8 warnings in PsycoGevent.py.
GeventLibrary: interpret _step() call as cooperative yields.
Enable gevent support in Sandbox, LS and RS.

Unfortunately it seems that there are problems with gevent.subprocess.
I wrote upstream to have more information.
Fix a few stupid typos and other bugs.

Of course subprocess didn't work, I hadn't ported Worker and
pretended that gevent.subprocess worked in another thread,
under the IO management performed by Async...
Migrate ScoringService to gevent.

This should be the last service, now Async is ready to be removed
from this branch. Yaeee!

On the negative side, SS was migrated to gevent, but it still retains
the horrible hack I put together for pushing to RWS using a
separate thread to prevent blocking. And let's avoid speaking of
the LogBridge hack. They'll have to be fixed as soon as possible,
now that we can.
Duplicate shared content between AsyncLibrary end GeventLibrary.

Prepare CMS for the removal of AsyncLibrary.
Remove the last traces of AsyncLibrary.

I'm actually leaving some traces in the test service, to remember
me that they have to be updated and checked to work.