A federal judge has dismissed the gun case against Hunter Biden after US President Joe Biden issued a sweeping pardon for his son.