Localization of nilpotent groups and spaces