libtime: add libtime_nanosleep function for high-precision sleeps

Signed-off-by: Steven Noonan <steven@uplinklabs.net>