api.devices: Return Device objects

Device is going to be used to represent every device in the network, so we
need to start setting up standards and define the specs of this function.
core/network.py: Retry and work around problems with scapy.srp()

It turns out that when we try to use scapy in a multithreaded environment,
it doesn't work very well (1). In order to work around this issue, I've
defined a wrapper around `scapy.srp()`.

[1] http://bb.secdev.org/scapy/issue/473/scapy-sendrecv-selects-eintr-problem-in

Conflicts:
	netcontrol/core/network.py
network._scapy_srp: Use timeout of 1 second and retry 5 times

The purpose of this change is to retry sending and receiving an answer, in
case we receive none for the first requests.
ui/mainwindow.py: Use Device objects

Now, the functions defined in the API need to get Device objects. This
commit introduces the proper modifications in `ui/mainwindows.py` so that
it complies with the specs.
api.start_control: Specify ip_address when creating the control objects

Up until now, the UI specified IP address as a string, so this issue had
gone unnoticed. The desired fixup, though, will be to make Control objects
to be created with Device objects.
ui/mainwindow.py: Rename namespace `netcontrol.api` as `netcontrol`

This change may look stupid, but makes the code more concise. An
alternative would be to import these as:
    from netcontrol.api import Device, etc

But it makes it harder to tell what module a function comes from.
Merge branch 'devices-spec'