Replaced math.h with shogun include.

Pushed changes in other files with similar replacement of math.h.

Squash of previous 2 commits for replacing math.h with shogun include.