Brown resigns but will hang on til Labour conference