The $\tau$-function of the universal Whitham hierarchy, matrix models and topological field theories