Bose-Einstein-condensed atoms in toroidal traps