Smoothness of Time Functions and the Metric Splitting of Globally Hyperbolic Spacetimes