rest: allow to access named entities via resources

This allows URL in the style of:

  /v1/resources/<resource_id>/entity/<entity_name>

to be equivalent of:

  /v1/entities/<entity_id>

Change-Id: I64a739fa6aec91b7c1e75af9a1812954651038f2
Merge "rest: allow to access named entities via resources"