The leader of Inverclyde Council has stepped down from his role after appearing in court earlier today.