datetime stuff on python 3
See issue #1066. This is enough to get pandas to import in Python 3; I've not yet tried beyond that.

Thank you, Thomas, this is excellent. 
 A few more fixes from digging into the tests, but I'm not yet making much headway with the tests (98 errors with the non-slow tests).

Latest finding: in some circumstances, the index code uses `np.searchsorted` when the type of the search term doesn't match the index type (e.g. searching for an integer in a string index). This fails with a TypeError on Python 3, because different types aren't orderable by default.
 I had a real blast refactoring the time series code today. May have to do some of the transcription here by hand if it doesn't merge properly. 
 I've rebased this, but I've realised the problems I'm still seeing aren't caused by Python 3. I think there's an integer overflow on my 32 bit platform, where IIUC `long` is only 32 bits. I'm trying to dig this out - if I get it, I'll make a separate PR.
 Can't fix it at the moment (I don't do much with C/Cython), but I'll file an issue for it.
