add forgotten sort_matrix method to Problem class
allocate memory as intended by GLPK api