Generalize CF encoding/decoding of datetime arrays to n-dimensions

Note: This will conflict with PR #40 because they both deal with handling of datetimeindex objects. Whichever goes in last will need to be rebased.