Unified handling of resources through ResourceInterface and ResourceId

The difference between "entity" resources and "class" resources has been removed. Everything is handled with the `ResourceId` object.

```php
interface ResourceInterface
{
    /**
     * @return ResourceId
     */
    public function getResourceId();
}
```

```php
class ResourceId
{
    // ...

    /**
     * @return string
     */
    public function getName()

    /**
     * @return int|null
     */
    public function getId()
}
```