A former Indonesian leader has appeared in court amid heavy security while the capital is on edge over separate claims about the eavesdropping of top officials.