libc: implement ftime.c

This is an import from musl. It exists in a newer version, but not in the one
we're using. When we update, we can get rid of this one. But that has to be a
concious and coordinated decision.

For now let's bring it in and keep it verbatim.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>