Refactor version resolving stuff to be more amenable to use as library.

(Read as 'hack it up for reuse within Galaxy'.)
Add --relaxed argument allowing resolution of env for non-vinstalled recipes.

Will be isolated to the package itself and not its dependencies. For instance:

% brew env --relaxed boost 1.55.0
LD_LIBRARY_PATH=/home/john/.linuxbrew/Cellar/boost/1.55.0_2/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH