[RFC] Make os_get_localtime() portable

@equalsraf rightly notices that `gettimeofday` is not portable, so I'm looking if all our uses of it are warranted. In this specific case I think we might just as well use `time()`. Since @philix wrote the code, I'd like to request a comment from him. (I suspect there was a good reason for using `gettimeofday` but I didn't find it. If that is the case, we can still use a portable `gettimeofday` emulator, for example: https://code.google.com/p/tesseract-ocr/issues/detail?id=631

Relevant articles/docs for future discussion:
- [_ftime(64)](http://msdn.microsoft.com/en-us/library/z54t9z5f.aspx)
- [Win32 Performance Measurement Options](http://www.drdobbs.com/windows/win32-performance-measurement-options/184416651)
- [On the various ways of getting the current time and date in Win32](http://blogs.msdn.com/b/oldnewthing/archive/2013/11/01/10462403.aspx)
@oni-link fixes pushed, please see if you think it's ok :).