add length to struct pkg_t

And this lets us reuse match_exact, which I now notice could benefit
from s/strcmp/memcmp since the length is known.