Hampshire moved back to the top of the Division Two table with a 278-run victory after Leicestershire's collapsed on the final day.