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

Which 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
netcontrol/api.py: Move Device to core/network.py

`api.py` needs to use Device only to expose it in the API, whereas other
modules like `network.py` will make more extensive use of it. Since
`api.py` is highly likely to import most of the low-level modules, it's
better that they are able to import it from another module different than
api.py. Otherwise, it would be extremly easy to get circular imports.
WIP - core/control.py: Use `network.MITM`

Update the `Control` class so that it uses the recently implemented
`network.MITM`.