Generalized parts of the XEN timer code into pvclock

This will later be used to support KVM clock. Until I can sort out
how to best include the pvclock.h header in the generic XEN headers,
use ugly casts in the XEN code to keep it compiling.