A bit of optimizations

I added a couple of tweaks:

1. `check_repo(path)` checks if path belongs to either a svn, git, or hg repository and returns which. Then, `add_repo_segment ` now calls only the corresponding `add_*_segment`, instead of trying all.
2. `Powerline.color` is memoized. This removes up to 50% of `color` function calls.