Remove Pending Entry stuff from Database classes.

For all the CHECKs in this loop, it'd be great if you could add the hash to the error message, so that someone who's getting this has a chance of debugging it?