Almost a third of legal aid firms 'consider pulling out'