Find all git-refs with desired suffix; choose shortest one

This pull request proposes a fix for https://github.com/opscode/chef/issues/2065

Currently, the output of ```git ls-remote``` is parsed for lines ending with the specified revision. If multiple tags happen to match, the first is returned, which may not represent the desired content.

This change finds all matches, and then returns the match of the shortest length. If the shortest length match does not represent the desired content, then the revision value can be lengthened to uniquely identify the desired content.
I think sort should be done by `x.split("/").length`, not by total characters.

Really dumb example: you're looking for `my_tag`, which exists in `/refs/tags/super-stable/my_tag` and `/refs/tags/dev/me/my_tag`.