Break out WebRtcNs_Energy function in ns_core

This is done in order to make the code more readible and maintainable.
This generates bit-exact output.

BUG=webrtc:3811
R=bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/23099004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7487 4adac7df-926f-26a2-2b94-8c16560cd09d