Rearrange reduction-related functions

This patch brings the reduction functions from both reduce.jl & abstractarray.jl together in reduce.jl. Methods of the same function are put together. This is a preparation for the efforts to clean up all these and ensure consistent implementation. (No changes except for moving stuff around were made at this point).