viml: re-add sha256() function

Was removed in #699 but actually doesn't have anything to do with security.
sha256: replace gettimeofday()

gettimeofday() is not portable. I suspect os_hrtime() is also better as a
seed than gettimeofday() or time() were.
term: replace gettimeofday()

gettimeofday() is not portable, replace with os_hrtime() wherever possible.
The new code should behave equivalently to the old implementation.

Because of this, HAVE_GETTIMEOFDAY is no longer necessary To be able to
handle double clicks.
cmake: remove check for gettimeofday

There are no more uses of gettimeofday, so remove the check in CMake.