Former Boston Bruins star defenseman Torey Krug, one of the top players available in this year’s free-agent class, has agreed to a multiyear contract with the St. Louis Blues.