generate bash completion scripts from XML doc files

This generates the scripts that lets bash do completion per specific tool.
It gets the options from the documentation XML files that are also the
source for the man pages and HTML.
I don't really see that anything gets installed to $(completiondir). Also, the uninstall procedure is missing. However, a maintainer for a specific distribution may copy the files by hand.