Adhesive and adhesiveless contact mechanics of elastic layers on slightly wavy rigid substrates