Invariant measures and maximal L^2 regularity for nonautonomous Ornstein-Uhlenbeck equations