Betting and gaming firms have pledged to create 5,000 apprenticeships over the next five years.