Lowe’s cut its full-year sales and earnings outlook as it said homeowners were taking on fewer do-it-yourself projects.