The captain of Japan's women's gymnastics team has withdrawn from the Paris Olympics after violating team rules by drinking alcohol and smoking.