Add tabcompletion support

Add proper tabcompletion support. Most work is code cleanup and adding unittests.
Not really. If `/etc/ccm.conf` specifies that the profile must be world readable, there isn't anything preventing us from querying it. This is the perfect opportunity to fix #3.