Spending rose 17 percent last year, with a focus on affordable housing, as congregations grapple with the changing role of faith institutions.