I resolved the factor of two from Griffiths' discussion of dipoles in non-uniform electric fields. The force on a dipole in a non-uniform field is where is the difference in the field between the plus end and the minus end. Component wise, where d is a unit vector. This holds for y and z, the whole thing can also be written as . Since p=qd, we can write .
Jackson derives it differently by deriving the electrostatic energy of a dielectric from the energy of a collection of charges in free space. He then derives the change in energy of a dielectric placed in a fixed source electric field to derive that the energy density w is given by . This explicity explains the factor of two and is an interesting alternative explanation.