The US has redacted large portions of documents related to a court battle over Prince Harry's visa application, saying it has a duty to protect his privacy.