Legal departments pushed more work onto their in-house teams this year and used artificial intelligence and automation while "significantly" cutting spending on outside counsel.