[Security] RoleSecurityIdentity checks for instances of RoleInterface to allow custom Role implementation

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #1538 #1673 #1748 #2541 #4309 #5026 #5076 #5171 #5303 #5909 #6012 #7791
| License       | MIT
| Doc PR        | no

Hi,

We are using a **custom** `Role` entity that's implementing the `RoleInterface`, but when we tried to apply ACL on the application, some `SecurityContext->isGranted` calls were denying access when they should actually allow.

After checking database, our code, Symfony code, we got to the dead end where the following triple comparison was returning false:

    $this->role === $sid->getRole()

One `$this->role` was holding our custom object that implements the RoleInterface the other `$sid->getRole()` was holding a string, the strict comparison would obviously fail.

After updating the constructor and tests, everything looks great.

Thanks,