BUG: Fix issue with incorrect groupby handling of NaT
closes #10590 

For groupby the time stamps gets converted to integervalue `tslib.iNaT`
which is -9223372036854775808. The aggregation is then done using this
value with incorrect result as a consequence. The solution proposed here
is to replace its value by np.nan in case it is a `datetime64[ns]`
