move wrap to a new period parameter

The period is given in mesh units. any mesh position will first be
wrapped between 0 ~ period before applying raise/ignore condition.

period can be different from the mesh size. period == None is none
periodic.