add a PkgVersion test for double-package files under die_on_line_insertion

This is a regression test which ensures that a caching issue within PPI
cannot cause PkgVersion to fail to find the empty line after the second
package line in a file with two packages. This does not currently fail,
but until PPI (currently 1.218) is fixed to calculate locations correctly
after a tree was changed, this can easily break with seemingly logical
changes in DZ; making this test valuable.
remove a line of dead code in PkgVersion
cache pkg line when looking for empty line after package in PkgVersion

This provides a measurable speed-up on dzil build on dzil itself.
stop search after having found all elements on after-pkg line in PkgVersion

This provides a measurable speed-up on dzil build on dzil itself.
don't slowly clone and prune in document_assigns_to_variable()

It is faster to skip END and DATA segments in this function than to clone
the document and prune it. I'm not sure if the order of the checks is
optimal. Putting the additional isa checks first might be faster. In any
case:

This provides a measurable speed-up on dzil build on dzil itself.