Build improvements.

@seancribbs @russelldb 

Resolve a series of Dialyzer errors, add rebar, and add a Makefile.
Also update dependencies to latest Bitcask and Riak Core.