Reverted HEAD~13..HEAD (all changes made from upstream).

My goal had been to switch from a manual install to using the native
packages APT repo. Unfortunately, the APT repo for sonar is unsigned,
which makes that approach a poor one.

I may come back through and cherry-pick some of the other commits that
made other changes.