Dynamics and pathology of dendritic spines