Katy Gallagher resigns chief ministership on Wednesday, special Assembly sitting to elect Andrew Barr on Thursday