Performs a cleanup and consistency check for the package store.
Interface used to ensure that the package index is correct.
packageIndex is null (Nothing in Visual Basic).