Scalar datetime64 and timedelta64 support

Ah, OK, might as well hang onto it.  It would be worth making it clear which functions were basically adapted from Numpy implementations, so we can tell the difference between accidental and intentional bugs later.