fixed bug in SD matcher that affected zero-variable productions and constraints with no variables, improved the debugging output of the SD matcher and Production apply best production