When was the peace treaty signed based on which Teutonic Knights suffered only minimal territorial losses?