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.
peerdrive_util: fix calls to deprecated crypto:sha_*()

Erlang deprecated direct calls to specific hash functions. Instead it is
recommended to use the generic crypto:hash_*() functions.