Shares rallied as investors embraced Ron Johnson’s vision for the retailer, which posted a much worse-than-expected second quarter loss and weak sales.