Fix issue with binary operation and object calls

When one or both operands of a binary operation call into the object layer (for example 'np.sum(x) + y'), numba fails to compile because the array expression is being rewritten in nopython mode. This commit changes this to not rewrite array expression if one of the operands calls into the object layer.
Refactor fix and add test
Merge branch 'sum_fix' into 0.11_maintenance