Finally finished all mmd kernel selection methods

-bugfixed (added a new constructor to SGMatrix)
-added a new test for median kernel selection

and used --squash to group all the commits that may cause errors :)