Slightly edging out forecasts, Apple’s revenue from services grew 19 percent from a year ago, but it was not enough to offset a slowdown in iPhone and iPad sales, which dragged down overall revenue for the second quarter in a row.