NSECx optimizations

Generate the NSECx records with around 20% fewer database queries.