Separate out nested dict functions into a module

Refactored to separate out all the nested dict functionality into it's
separate module to keep the main lookupy module clean and concise. The
names of the functions and their usage in both code and tests has also
been changed.

This commit introduced relative imports so the examples have also been
fixed accordingly