p.haul: close socket to the CRIU service if smth failed

This patch implements __exit__ and __enter__ methods for the
criu_conn class and uses the "with" statement to access objects
of this class.

"""
When the “with” statement is executed, Python evaluates the expression,
calls the __enter__ method on the resulting value (which is called a
“context guard”), and assigns whatever __enter__ returns to the variable
given by as. Python will then execute the code body, and no matter what
happens in that code, call the guard object’s __exit__ method.
"""

Currently this socket is not closed in error cases. For example:

[src] $ ./p.haul ovz 1001 192.168.122.36
Asking target host to restore
======= Remote traceback =======
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rpyc/core/protocol.py", line 300, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "/usr/lib/python2.7/site-packages/rpyc/core/protocol.py", line 532, in _handle_call
    return self._local_objects[oid](*args, **dict(kwargs))
  File "/vz/lxc/p.haul/p_haul_service.py", line 122, in exposed_restore_from_images
    self.htype.net_unlock()
  File "/vz/lxc/p.haul/p_haul_ovz.py", line 177, in net_unlock
    netif.ifup(veth.pairs)
AttributeError: net_dev instance has no attribute 'pairs'

======= Local exception ========
Traceback (most recent call last):
  File "./p.haul", line 39, in <module>
    worker.start_migration()
  File "/vz/lxc/p.haul/p_haul_iters.py", line 202, in start_migration
    self.th.restore_from_images()
  File "/usr/lib/python2.7/site-packages/rpyc/core/netref.py", line 196, in __call__
    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
  File "/usr/lib/python2.7/site-packages/rpyc/core/netref.py", line 71, in syncreq
    return conn.sync_request(handler, oid, *args)
  File "/usr/lib/python2.7/site-packages/rpyc/core/protocol.py", line 438, in sync_request
    raise obj
AttributeError: net_dev instance has no attribute 'pairs'

[src] $ ps axf
...
  912 ?        Ss     0:00 init
...

[dst] $ ps axf
...
28170 ?        Ss     0:00 ./criu service -v4 -o criu.service.log --daemon
28293 ?        S      0:00  \_ ./criu service -v4 -o criu.service.log --daemon
28295 ?        Ss     0:00      \_ init

[dst] # lsof -p 28293 | grep unix
criu    28293 root    4u  unix 0xffff8800b9a3d280      0t0      79903 /var/run/criu_service.socket
[dst] # ss -x | grep 79903
u_dgr  ESTAB      0      0      /var/run/criu_service.socket 79903                 * 79401
u_dgr  ESTAB      0      0                    * 79401                 * 79903

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>