Move most code from build_changed_aports.py to common.py. Another patch will follow soon, which uses common.py to check the versions of changed aports. Related: #187