core/network.py: Implement a class that runs Man-in-the-middle attacks

This class represents an attack over a device in the network. This code
works but needs polishing because there's some duplication.
core/network.py: Add get_gateway, necessary for MITM
core/control.py: Use `network.MITM` in order to take control over devices

This was the intended purpose of all the commits before this one. This way,
we get rid of the burden of using a system call for this task, and we won't
have to worry about killing extra processes.
fixes for another branch