806: Implement hyper.rewrite(Sum)

This adds the function _eval_rewrite_as_Sum to the class hyper.
806: hyper.rewrite(Sum)

Change return value to Piecewise
Add tests
806: Improve code style
Merge pull request #2032 from katjasophie/806_hyper.rewrite(Sum)

Issue 806: Implement hyper.rewrite(Sum)