Simona Halep survives four-hour epic against Davis