Broncos, Wilson edge Niners, Garoppolo 11-10 in prime time