Supporting buffer delay compensation and simplifying handling of head skip and tail time

  Fixes #164