general collision detection for any two objects with x,y,width,height