refactored in riak_kv bits from riak.schema with tests

Here you'll find all the kv bits of the schema, and a unit test that validates them.