Nilpotent bases for distributions and control systems