Fix undefined behaviour in raster intersection

Closes #4249
Closes https://github.com/postgis/postgis/pull/340




git-svn-id: http://svn.osgeo.org/postgis/trunk@17043 b70326c6-7e19-0410-871a-916f4a2858ee
1 job for svn-trunk in 30 minutes and 58 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #123569404
test

00:30:58