Update demag.go to work with new demag tensor.

Added Newell's demagnetizing tensor calculation.