remove broken now()-based cycle count + add perf_event support. Provide header file for Android. Fix #557 and fix #556