Brushless dc motor and planetary gearhead