US appeals court upholds right to carry gun in public