Broncos, Wilson edge Niners, Garoppolo in prime time