Israeli producer of invasive phone software claimed protection as agent of foreign government, but justices leave in place lower court rulings, say company 'plainly' not entitled