Separation of metal ions by mesoporous materials: effect of the morphology and functional groups on their performance