bobthefish: hg fixes

I had `hg` errors in my console, so I added ignoring them everythere. I've `hg` invocation more consistent also (in some places it was invoked as `command hg`, in other places just `hg`).
I think that `git` can be wrapped the same way.
@bpinto @bobthecow are you agree?

UPD: made hg repo checking much faster for normal dirs and insignificantly slower for repos.

Checking all parent directories for `.hg` works much faster than any command like `hg X`. If it fails we don't need to call `hg`. It makes prompt appearance much faster.
You can test it on your own machine. I cannot notice any lag even on deep directories like `/usr/lib64/python3.4/site-packages/pymongo/__pycache__/`.
Sure, it would be faster. But wait. We are checking hg repo with `hg root` anyway. Can't we save this value (in `...in_hg` function) and use it (in other functions)? Saving it would be faster (we don't need to traverse dirs over and over again), returning `$d` would be easier.