os/time: include time.h in os/time.h

Include what you use, also in the positive direction.

(cherry picked from commit 283e2ed1e62bfdf9641bf35c507a88fd0204d519)
os/time: make os_get_localtime more portable

gettimeofday() doesn't exist on Windows, as reported by @equalsraf. It seems
a call to time() would be sufficient here, as only the seconds since the
UNIX epoch are needed.

(cherry picked from commit 7e3d15c537800bc13c1a619b8f970560c4671d43)

Conflicts:
	src/nvim/os/time.c
os/time: fix os_localtime_r on win + add func_attr

- it makes no sense for these functions to take NULL pointers
- if `localtime()` on Windows returns a NULL pointer, the old code would try
  to dereference it.

(cherry picked from commit e397491b512c9bb3f915f58c58b7acc8aa52ff56)
For MSVC link static dependencies

- MSVC has 4 incompatible runtimes: static and dynamic and debug or
  non-debug - and these must not be mixed
- We also assume static linking for Windows - with debug nor non-debug
  variant controlled by the CMAKE_BUILD_TYPE
FIXME: Get rid of libintl dependency