image/gif: fix frame-inside-image bounds checking.
image/gif: fix frame-inside-image bounds checking.

The semantics of the Go image.Rectangle type is that the In and
Intersects methods treat empty rectangles specially. There are multiple
valid representations of an empty image.Rectangle. One of them is the
zero image.Rectangle but there are others. They're obviously not all
equal in the == sense, so we shouldn't use != to check GIF's semantics.

This change will allow us to re-roll
a855da29dbd7a80c4d87a421c1f88a8603c020fa "image: fix the overlap check
in Rectangle.Intersect" which was rolled back in
14347ee480968c712ea885a4ea62779fd8a0dc44.

Change-Id: Ie1a0d092510a7bb6170e61adbf334b21361ff9e6
Reviewed-on: https://go-review.googlesource.com/36639
Run-TryBot: Nigel Tao <58ae08b3356928ff9c67562b4719487d54fe8348@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Rob Pike <4dc7c9ec434ed06502767136789763ec11d2c4b7@golang.org>

golang/go,CAFxX/go,cloudflare/go,vsekhar/elastic-go,polyverse-security/go,linux-on-ibm-z/go,polyverse-security/go,vsekhar/elastic-go,linux-on-ibm-z/go,derekmarcotte/go,codestation/go,cloudflare/go,cloudflare/go,Cofyc/go,akutz/go,golang/go,Cofyc/go,golang/go,CAFxX/go,polyverse-security/go,linux-on-ibm-z/go,codestation/go,derekmarcotte/go,josharian/go,akutz/go,josharian/go,nawawi/go,Cofyc/go,josharian/go,cloudflare/go,ImJasonH/go,ImJasonH/go,nawawi/go,CAFxX/go,polyverse-security/go,vsekhar/elastic-go,golang/go,CAFxX/go,nawawi/go,golang/go,josharian/go,Cofyc/go,linux-on-ibm-z/go,codestation/go,CAFxX/go,codestation/go,codestation/go,vsekhar/elastic-go,ImJasonH/go,golang/go,Cofyc/go,derekmarcotte/go,linux-on-ibm-z/go,cloudflare/go,CAFxX/go,derekmarcotte/go,akutz/go,ImJasonH/go,linux-on-ibm-z/go,polyverse-security/go,golang/go,vsekhar/elastic-go,nawawi/go,cloudflare/go,polyverse-security/go,josharian/go,akutz/go,akutz/go,polyverse-security/go,akutz/go,derekmarcotte/go,akutz/go,linux-on-ibm-z/go,Cofyc/go,CAFxX/go,vsekhar/elastic-go,akutz/go,nawawi/go,codestation/go,josharian/go,CAFxX/go,vsekhar/elastic-go,ImJasonH/go,Cofyc/go,ImJasonH/go,polyverse-security/go,ImJasonH/go,josharian/go,nawawi/go,derekmarcotte/go,codestation/go,ImJasonH/go,Cofyc/go,codestation/go,christopher-henderson/Go,nawawi/go,cloudflare/go,derekmarcotte/go,linux-on-ibm-z/go,derekmarcotte/go,golang/go,vsekhar/elastic-go,cloudflare/go,josharian/go,nawawi/go