Online fashion retailer Asos beat analyst expectations with its first-half results, but saw pre-tax profits fall on higher investment levels.