Tech companies are getting the hang of making money, or at least they’re losing far less than they used to when money was cheap and “growth” was sexy.