sum of an empty array should be 0

fixes an error this causes in rails.
see http://stackoverflow.com/questions/9289535/rails-3-2-uniqueness-validation-raises-undefined-method-zero-for-nilnilclass.

apologies for lack of test coverage; i'm not familiar with test unit and couldn't quite make sense of your tests.