Upgrade consul to 0.4.0

Closes #6027.
Merge pull request #6028 from vitorgalvao/fix-6027

Upgrade consul to 0.4.0