The propagation of groups of waves in dispersive media, with application to waves on water produced by a travelling disturbance