Grigor Dimitrov beat Matteo Berrettini in a five-set thriller at Wimbledon to reach the fourth round. The world number 146 will next face British player Arthur Fery.