Part of Meta-ticket #34201: Replace imports from sage.*.all for namespace packages
Also clean up some other outdated importing practices.
CC:  @DavidAyotte
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: f76fe41
Reviewer: David Ayotte
Issue created by migration from https://trac.sagemath.org/ticket/34191