continuing tidying up

1. rename  cs_primitive -> cs_resource
2. fix spec
3. fix incorrect colocation sorting, that breaks dependant and dependency behaviour