NEW YORK, July 21 (Reuters) - A federal judge rejected HSBC Holdings Plc's bid to dismiss a U.S. lawsuit claiming that its failure to perform its duties as trustee for $2.37 billion of residential mortgage-backed securities contributed to the downfall of five federal credit unions.