Make recompute() responsible for cache updates

This is a huge change but it seems sensible: the only call to rebuild()
anywhere in the code already updated the cache manually.  Now that I
want to forcibly call rebuild() on things like files that I can see have
just been edited, it seems that the call should clearly have the cache
update step built in.