49ers ink Marquise Goodwin to three-year extension