INTEGRABLE MULTIDIMENSIONAL COSMOLOGIES WITH MATTER AND A SCALAR FIELD