Create a MEX equivalent to minreal from the control toolbx

See the comments in get_minimal_state_representation.m.