SAN FRANCISCO — The SoftBank Vision Fund has sold its stake in Wag, the troubled dog-walking start-up, back to the company at a loss, according to two people briefed on the deal, in a further sign of turmoil for the Japanese investment powerhouse that has bet big and lost big on the technologies of the future.Garrett Smallwood, who became Wag’s chief executive in November, said on Monday in an internal memo viewed by The New York Times that Wag and SoftBank were “amicably parting ways.” Mr. Smallwood characterized the move as part of Wag’s new plan to “refocus on delivering sustainable growth.” Mr. Smallwood’s memo said a number of employees were laid off Monday as part of that plan, which was reported earlier by The Wall Street Journal.