Extract installer setup to prelude method
Let commands decide what mode the installer should use
Find Homebrew Python when building --HEAD

When building --HEAD and --with-python, CMake gets confused by multiple
python installations, e.g. when both Homebrew and system Pythons exist
(see https://github.com/Homebrew/homebrew/issues/10393 for one example).
This patch lifts some hacks from
https://github.com/Homebrew/homebrew/blob/51d054c/Library/Formula/opencv.rb
to point CMake to the Homebrew Python only, if one exists and is
installed.

N.B. brew test ledger seems to be  broken when installed --HEAD for
unrelated reasons.
ledger: add 2.6.3 bottle.