Applying torque to the Escherichia coli flagellar motor using magnetic tweezers