Refactor'd token/lock manager.

This is a refactor'd branch of cet-bg-mgr and previous PR https://github.com/basho/riak_core/pull/364

The integration with the handoff manager has been removed and will appear in a separate PR.

The work here merges the lock and token managers and addresses previous PR comments.
Also added are lots more tests.