packages: add homebrew custom definition

this way we can bootstrap homebrew
system: extract system-related functions

also provide tests for `is_platform` function
system: check_output_for helper function

to be used mostly in status bodies, but should be useful elsewhere
src: brew can satisfy

obviously we're still not doing a few things needed, but it's a good start. See
the TODO notes in the brew source file.
system: check_output_for improvements

the tests should have been a bit smarter

Also, if the binary is missing, return 1
if the text output doesn't match, return 2