State Attorneys General Said to Be Near Formal Investigation of Tech Companies