proper resolv.conf parsing

This pullrequest parses resolv.conf properly. It splits in lines and strips away comments. 

This prevents issues such as:

 * commented localhost nameserver, which should not be used. This would mean you get the default google-dns nameservers; eg:
```
nameserver 10.0.0.2
#nameserver 127.0.1.1
```
 * commented nameservers, which means we have no nameservers at all, eg:
```
#nameserver 10.0.0.2
```