Law firms are increasingly adding new staff members and software to calculate their profitability, helping firms determine partner compensation and make other business decisions.