The thrust and heavy-jet mass distributions in the two-jet region