Dynamics of Entanglement with Applications to Quantum Metrology