A model for bacterial flagellar motor: Free energy transduction and self-organization of rotational motion