The contextmembershipsurl property on the nrsp_info object is itself
an object of type moodle_url so its getter should return a copy
of the moodle_url object instead of a reference to the class-internal
object. This commit adds a test for get_context_memberships_url and
updates the getter so the property is immutable.