Add MIN() macro
Fix: size selection in ws_buffer_blit()

It previousely took the biggest sizes altough we should
take the smallest.