The number of pubs in England and Wales dipped below 39,000 for the first time, according to new figures.