This commit fixes compilation problems related to
snprintf() for Windows users.
Thanks to Raka Prasetya for reporting the errors.
Thanks also to Kenneth Heafield and Barry Haddow for suggestions.
- Add a high resolution timing function to measure the
wall-clock time by gettimeofday().
- Now the Timer class use getrusage() to measure the elapsed
CPU time as KenLM does.
- Revive Timer::restart().
- Add Timer::ToString() for reporting the detail statistics
as well as for debugging.
- Add a simple unit test for Timer.