window: Remove reimplementation of Program.all_inherits and use the original.

The reimplementation was based on a source code misunderstanding, now solved
by the original function being properly documented. Yay! I like it when the
thing I need already exists!