netwatch: rebar: fix passing defines in erl_opts

The erlang compile module does not support the option {define, ...} any
more, instead {d, ...} is used.

See: http://www.erlang.org/doc/man/compile.html
netwatch: fix calls to deprecated driver_output_term()

Erlang has deprecated the driver_output_term() function. It is
recommended to use erl_drv_output_term() instead.

This commit defines a output_term() macro which will resolve to
either function, depending on the port driver interface version used.
netwatch: add simple start/stop eunit test
netwatch: add support for Mac OS X

Tested on OS X 10.9.1.