Wrong Dateline wrapping on extents that cross the dateline

Setup:
- issue a getmap request for a projected SRS, with an extent that crosses the dateline, e.g. ```-21000000,-21000000,21000000,21000000```
- use a mapfile with a layer who's data is stored in lonlat

Expected:
- MapServer uses a searchrect for querying the layer data, that ressembles ```-181,-90,181,90``` or ```-180,-90,180,90```

Issue:
- The searchrect created looks like this: https://gist.github.com/tbonfort/9779573 which is obviously creating incorrect results