ikiwiki/ todo/ plugin dependency calulation

A few plugins need more complex dependency calculations than ikiwiki can do on its own:

These suggest there should be a way for plugins to have hooks that tweak the list of pages to rebuild.

Which in turn suggests that there should be a list of pages to rebuild; currently there's not, and the best such an interface could do would be to rebuild the pages even if they were already going to be rebuilt for some other reason. (See optimisations.)

It also suggests that plugins will want to examine pages and/or store data about them to use in the dependency calculations. For example, the version plugin would need to store info about what pages use it.

I fixed this without realizing it when I added the needsbuild hook! --Joey