Comparison of the reaction pp → K0K0 at rest in hydrogen and deuterium. A test of S-state annihilation dominance