rpc: Explicitly close rpc and data sockets

Python may keep them opened till the next GC run, which
in turn may happen _after_ the select. Thus, after client
disconnect, we may sit for some time with CLOSE_WAIT
pair of sockets.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
images: Don't keep wdir opened

The builting open() doesn't opens directories, so we use the os.open()
method. Unfortunately, this one is not an object and does leaks when
we forget to close the descriptor by hands.'

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
images: Don't keep images opened

Same problem as with wdir in prev patch -- don't keep os.open()-ed thing
forever, close it.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>