Added class checking to __eq__ function

The \__eq__ function in Image.py makes no allowances that the comparison object might not be another Image instance.

So

    >>> item = Image.new('RGB',(25,25),'#000')
    >>> item == None

gives

    Image.py, line 578, in __eq__
        a = (self.mode == other.mode)
    AttributeError: 'NoneType' object has no attribute 'mode'