Dynamics of Entanglement in One-Dimensional Spin Systems