Hampshire collapse to three-day defeat amid their centuries and Lyndon James’ five-for