Entanglement and quantum clocks in curved spacetime