Mechanical device consisting of a toothed wheel or rack engaged with a pawl that permits it to move in only one direction