Shaft sealings specially adapted for rotary or oscillating-piston machines or engines