Implement PGIA for any number of objectives.

Uses smarter scheduling, so a task is only scheduled if its dependencies
are met.

Do not merge this branch directly into master; these commits will be
cleaned up, squashed, and then rebased into the main amalgam-pgia
branch. Then this scratch branch will be deleted.