Modified the Euler-MacLaurin algorithm. Fixed issue #8504

Modified the Euler-MacLaurin algorithm. Prior to the commit, the algorithm would break in cases where the expression was equivalent to 0. Now, the algorithm will continue to work until the intended end of range. Fixes several issues, including issue #8504. Also gets close to solving issue #8321 previously returning 0 where as now returning a very large number.

collaboration with @Mitchell-McCann
If you could change this to a nonlinear example that would be better: #8554 handles polynomial cases. So something like the following would be good.

```python
e = Piecewise((exp(-i), Mod(i, 2) > 0), (0, True))
s = Sum(e, (i,0,11))
assert s.n(3) == s.doit().n(3)
```