The Role of the Dust in Primeval Galaxies: A Simple Physical Model for Lyman Break Galaxies and Lyα Emitters