Switch to custom Mercurial client

This switch would provide better flexibility and error reporting.