Added check for Date in AsyncSort before calling Array.sort().
Renamed defaultCompare() to primitiveCompare().

Change-Id: Ib70c6a358d27dda4f2d84afb985f08dbd8f8c6c1