More lookupd module tests, lookupd module refactor

* Refactored tests for lookupd module
* Added tests for lookupd.lookup
* Refactored shared logic between `nodes` and `lookup` in `lookupd`
module