Boston joins trend of cash-strapped municipalities wringing money from their nonprofits.