Clean up ready for new code
A roadmap on what we're going to attempt here.
Proof of concept version
Abstract as much as possible in to a class that doesn't rely on querying the database, to make testing less painful.
Fixes for late night coding bugs
Sort keyword args so that the tests are saner.
Test cases
Support for coercing dicts to lists.

Specify fields to be hit with dict.values()
Fixes for config, pep8 and ext_pillar
Proper docs
Simplify __virtual__function
Remove needless regex checks

Using socket.inet_pton() is more efficient, and less error prone, than
using regexes.
Alias lowercase versions of functions
Log dig command output at debug
Make dig.SPF recurse include and redirect entries
Fixed unit tests

Had to skip two tests because I don't know how to mock properly when
recursion is involved.

Also made some PEP8 fixes.
Fix race condition in get_cache_returns if you ask for the return right after starting the job
folow pattern for checking POLLIN
DRY socket polling/recv
DRY schedule eval