We also remove some module-level imports of AA etc.
Split out from #32432.
CC: @kliem @jplab @yuan-zhou @sheerluck
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: da3d534
Reviewer: Jonathan Kliem
Issue created by migration from https://trac.sagemath.org/ticket/34195