The Bishop of Liverpool has resigned after allegations of sexual assault and harassment were made against him.