Mass extinctions as major transitions