E2 datasignal - rewrote the IsAllowed check

Rewrote the function that checks if a message is allowed to be sent to
an E2 depending on the scope of the sender and receiver. I noticed it
didn't work properly when using certain combinations of scopes with
certain combinations of PP friends lists.