Diosi-Penrose criterion for solids in quantum superpositions and a single-photon detector