| reshapes a timeseries |x| defined by
% time |t| onto a date-of-year by year grid.  If the original timeseries is
% has higher than daily resolution, values are averaged for each date; for
% dates where the original timeseries included no data, NaNs are used.  The
% resulting grid |xg| will be a 365 x n grid, where n is the number of
% unique years spanned by the the original timeseries; |yr| is a vector
% holding these year values. 
%
% |[xg, yr] = reshapetimeseries(t, x, 'bin', nbin)| reshapes the timese