In a closely watched decision, the US Court of Appeals for the First Circuit confirmed the government’s expansive authority to search cell phones, laptops, and other electronic devices at the border.