Quantum-enhanced interferometry by entanglement-assisted rejection of environmental noise