Changed from rebar to erlang.mk

Fixed a couple of Erlang compile warnings in the process.

Note: the build on Mac using cross compilation does not work right now.
Remove rebar.config
Merge branch 'mk'