Modeling and simulation of uni- and multi-flagellar bacterial locomotion in a viscous fluid