US President Barack Obama is commuting the prison sentence of Chelsea Manning, the former US army intelligence analyst who leaked classified documents.