Support for building "overlay" package databases

@snoyberg These changes are to support building extra package sets on-top of Stackage.