The US Homeland Security secretary said there is no risk in livestreaming Nidal Hasan’s execution, drawing harsh criticism and warnings that the plan could encourage violence.