US appeals court upholds gun laws after Newtown massacre