Fix/dhcp bugs and refactoring

Greatly improved code in dhcp checker. Fixed bug with dhcp behaviour on network down
For example of usage look at tests.py:TestDhcpWithNetworkDown