refactored riak_core bits of the schema in here, with tests

Although the rebar.config specifies `cuttlefish:develop`, it will need jd-test-tools to run until https://github.com/basho/cuttlefish/pull/42 is merged. If you do review this, be a dear and review that too? :)

I've refactored the riak_core bits of the schema into the riak_core project for easier testing and less duplication of schema files between the riak and riak-ee repos..