kernel_matrix

1. rewrite kernel_matrix in new style. 
2. fix the curve animation in gp demo