Machine: unmap veth devices during deconfiguration

This patch adds two unmap_if calls that were forgotten in the recent
reimplementation of interface (un)mapping.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
ConnectionHandler: reimplementation

This commit reimplements the ConnectionHandler class while kkeping the
same interface. The main point was to store file handles in a list
instead of a dictionary which can have name conflicts. The old
dictionary is still used but only to map a connection name to the
connection. This allows us to introduce more mappings in derived classes
and keep the connection checking code from the main class.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
MessageDispatcher: use connection_mapping

This patch updates both the MessageDispatcher and the
MessageDispatcherLite classes to use the _connection_mapping attribute
of the parent class.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
ServerHandler: inherit from ConnectionHandler

This patch makes the class ServerHandler a class derived from the
ConnectionHandler. In addition to the standard connection_mapping it
adds a new _netns_con_mapping that maps network namespaces to Pipe
objects.

This solves the problems of the previous implementation where we would
have two ConnectionHandlers controlled by the ServerHandler which caused
either 100% CPU consumption or slowdowns because of select timeouts.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>