clock_gettime(CLOCK_PROCESS_CPUTIME_ID) - subtract idle time

clock_gettime(CLOCK_PROCESS_CPUTIME_ID) currently returns the full wall time
since boot, but we are expected to remove, at least, idle time, so this patch
does it.

As explained in comments, the accuracy of this implementation is
limited to the length of idle time slices (while a cpu is inside the
idle time slice, we don't know that it is, and believe it is busy);
This currently cannot be more than 0.1 seconds but on a busy system
is usually much shorter. I think this is fine (certainly better than what
we had until now), but if it bothers anyone we can fix it in the future).

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

Java application calls os.getProcessCpuTime() which in turn calls times() to
get process cpu time.

With this patch, solr-benchmark[1] reports Average CPU Load correctly. This
patch also makes jvisualvm get the correct cpu usage.

[1] https://hg.codespot.com/a/apache-extras.org/luceneutil

Fixes #321

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vfs: implement futimesat()

Fixes #330

OpenJDK uses futimesat() in some places.
dirfd must point to a directory if pathname is not absolute.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Jaspal Singh Dhillon <jaspal.iiith@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>