Break out Debian-specific functions into deb_apache.py

Also fixes #10388.