apt_repository: autoinstall python-apt if not available

This is almost identical to the apt issue (#4079) and its corresponding fix (#4617)