refactored riak_core bits of the schema in here, with tests
minor changes based on PR#417
Merge pull request #417 from basho/jd-cuttlefish

refactored riak_core bits of the schema in here, with tests