Delegates rejected calls to disaffiliate after a passionate three-hour debate, while warning the Labour leadership that working-class members demand change