use perf interface if no rdtsc instruction is known

On X86 and X86-64, the rdtsc instruction reads a monotonically increasing
CPU clock-cycle counter register.  This instruction is unpriviledged,
in that it can be run in kernel or userspace without any special setup
or permissions.

On ARM there's a similar CPU cycle counter, but the instruction that
reads it is priviledged, in that it can only be used from the kernel.
You can disable the priviledge checking, but again, only from the kernel.
So before you can read the CPU cycle counter from userspace on ARM,
you need to load a kernel module to enable it.

This commit does not add this kernel module, instead it uses the Linux
Perf interface to read the cycle counter.  This is portable but has
higher overhead than just running a single instruction.  The overhead
is ~2500 cycles, or 2.5 microseconds on my 1 GHz Beagle Bone Black.