Fix dateline wrapping logic for bounding boxes (#4896)

- Fixes a typo in the shapefile wrapping code to compare a vertex
  against its predecessor rather than the initial vertex to detect
  potential dateline hops.
- Forces +over proj parameter when reprojecting bboxes in order to
  conserve the initial property of wether the bbox intersects the
  dateline.