High-Fidelity Entanglement and Detection of Alkaline-Earth Rydberg Atoms.