Exchange-correlation functionals for band gaps of solids: benchmark, reparametrization and machine learning