Linearization and stability of singular foliations