UK retailer Waitrose has seen investment costs eat into its half-year profits despite increasing like-for-like sales.