Northern Ireland first minister resigns