use MonoTime/Duration instead of clock() for higher precision when profiling the GC
also fix building with PRINTF_TO_FILE
Merge pull request #1005 from rainers/gc_profile_ticks

use MonoTime/Duration instead of clock() for higher precision when profiling the GC