Fast flame acceleration and deflagration-to-detonation transition in smooth and obstructed tubes, channels and slits