Fix support for datetime axes in 2d plots.

Fixes the error raisesd when 2d datetime coordinates are passed to
contour/contourf and the errors when 1d or 2d datetime coordinates
are passed to pcolor/pcolormesh.