(NC-138) Move class endpoint under environments

This changes the url structure to represent that an instance of a class exists
within an environment. Before this it wasn't possible to distinguish between
different versions of a class across environments properly.
Extract common "/v1" prefix to a context