Walmart has been a killer stock for the better part of this decade, but it’s now struggling to keep pace with its biggest rivals and the overall market.