Add more convenience math functions

To fulfill the requests of the issue #146, the following math functions are added and tested: __builtin_popcount* based fast hamming distance, sum of absolute values, element wise sign and fabs, and non-in-place scaling. 

Note the cherry pick from the boost-eigen branch. The commit was authored by Rowland Depp who is in fact @Yangqing. I think it is time to merge the branch into either dev or master.