Refactor to increase modularity.
The new structure has separate classes for data collection, internal data
representation, and shell code generation. This should allow great
improvements to unit testing, as the parts can be tested independently.
https://code.launchpad.net/~gagern/bzr/bug560030-include-bash-completion-plugin/+merge/23912