Correct Sum behaviour when using Range to generate index values (addresses #149)

At the moment the code assumes that ```imax_``` in ```'%(name)s[expr_, {i_Symbol, imax_}]'``` is an integer and defines a rule to generate an expression that is processed by ```apply_iter```. This is not always the case since ```imax_``` can be something like ```Range[...]```. The modified code removes the rule above and introduces a check on ```imax_``` (```apply_range```) in order to choose which one is the correct function to use. This solves #149.