Fix real assumption for gamma function.

Fixes #8657

@pelegm @skirpichev 
No, that's wrong.  What if x.is_integer, but x.is_nonpositive is None?