A Tunisian court has opened a high-profile trial in which 40 people stand accused of conspiring against state security.