Speed up vulnerability audit process
Speed up vulnerability audit process

Sort VuXML entries using lexicographical ordering of largest
non-globbing prefixes and use few tricks to benefit from the
sorted array:

 * select the first entry for the given installed package using
   precomputed table for the first byte of the package name;

 * skip entries with identical non-globbing prefix if it does
   not match the package name;

 * once we found VuXML entry with the non-globbing prefix that
   is strictly larger than the prefix of the same size taken
   from the package name, there is no point to search any further.

This gives me up to 5x decrease in total processing time for
'pkg audit'.

Signed-off-by: Eygene Ryabinkin <9f2104e8f86374257270d0eb74ac82c1c7e1ca3c@FreeBSD.org>

en90/pkg,skoef/pkg,junovitch/pkg,Open343/pkg,junovitch/pkg,skoef/pkg,khorben/pkg,en90/pkg,khorben/pkg,khorben/pkg,Open343/pkg