Break out mapping resolver, add initial tests
Add tests for _map_field and _cast_mapping_type