Legal departments cut outside spending, focus on managers and specialists, study shows