Civil-law mechanism of regulation of investment relations complicated by a foreign element