Initial implementation of public dashboards api

also move factories into common location
includes cheeky over implementation of the find by slug logic
needs lots of tests for this bit
Recursive dashboard fetching
Stop recursing on slug after 3 attempts

This is to prevent aribitrary execution of db queries by constructing a
url with a large directory structure. It is also the current behaviour
of spotlight.
Return 404 with error when no dashboard found

also fix pep8 issues
Move view utils to libs folder

To share the utils across the dashboards and datasets apps because both
use them.