Implement support for options with homebrew.

 - The support for homebrew options seems to have been lost in fa4d0b6.
 - This commit supports installing options and checking installed options.
 - Options are accepted if the installed ones are a super set of the ones
   declared in rosdep.
 - We also add support for `install_flags`, which are similar to options
   and get passed to `brew install`, but do not get checked for already
   installed packages.
 - Checking installed packages can be slow, as we have to call the `brew`
   command for each potential package to check if it is really linked and if the
   options are ok.
 - There are some limitations to what we can detect, for example we do not check
   for formulae from wrong taps, we do not preserve already installed options
   for reinstall of packages (see TODOs in source).
 - Some scenarios cannot be resolved automatically, e.g. installing the correct
   options for a package that is also in the dependency list of another homebrew
   package to be installed (see TODOs in source).
 - See https://github.com/ros-infrastructure/rosdep/issues/299 for a discussion
   of what the semantics should/could be.
Fix unicode handling and use isinstance.
Merge pull request #304 from NikolausDemmel/homebrew-check-options-patch

Implement support for options with homebrew.