Use clock_gettime() when available and get rid of deprecated gettimeofday()

Conflicts:
	extconf.rb
Merge branch 'gauteh/use-clock-gettime-when-available'

Conflicts:
	extconf.rb