The number of pubs in England and Wales dipped below 39,000 for the first time after hundreds of locals shut their doors for good this year, according to new figures.