refactor(cockpit/breadcrumbs): clean $rootScope from breadcrumbs

This commit also adds some comments for documentation generation with jsdoc and
improve the linting of some files.

Closes CAM-1779