Some efficiency improvements

I originally started this PR to fix the use of PPI (Dist::Zilla has a role which caches the PPI document tree, refreshing it whenever anything changes it, which saves a lot of time from having to re-parse the document again), but I saw a few other little improvements that could be made at the same time.  None of them change any actual functionality.