Fixed memory leak in GaussianLikelihood and StudentsTLikelihood unit tests

Fixed #1156 and #1157 issues