Adhesion and friction of an elastic half-space in contact with a slightly wavy rigid surface