apt_repository: added option 'base_codename'

Fixed the source line to be added when the repo is a PPA and the target is an ubuntu-based distributions like Linux Mint.
Refactored the identification of target distro to apply additional rules for dealing with PPA repos.
Raise a failure message  when `base_codename` is not defined when repo is a PPA and target is an ubuntu-based distro.