Topological strings, two-dimensional Yang-Mills theory and Chern-Simons theory on torus bundles