[[ Bug 10910 ]] fix crash when cropping image

reimplement bitmap region clamping to be more robust & fix crash in MCImageBitmapCopyRegionToBitmap