Restrict definition of abs() method

The definition was extended before for all types of tensors, but it
should only be defined for Float, Double, Int and Long tensors.