alternatives-2.eclass updates

Here are my changes for review. There are three more commits on top of what was sent to the mailing list and "Add documentation comments" was updated a bit.

It was based on o.g.o tree which was a bit out of sync.

Also sfabbro pushed a fix for the same issue as my "Fix check for uninstalling" without actually fixing anything, so I would prefer that it gets replaced by my version.