Mean field theory, two-dimensional topological field theories and multi-matrix models