sampler: clamp computed cache area after computation

nohalo/lohalo have context rects which are 64px wide, the padding added to get
a better idea of sampling direction could overflow the 64x64 size of the cache
buf; clamping after computing the rect fixes this. Also plugs a leak of mipmap
copies.