[ticket/12493] Fix sql query for selection of users that have disabled PM

This fixes a bug where a user A could not send a PM to user B when both users
allowed other users to send them a PM. More precisely, it fixes the selection
of users that either are inactive or have disabled private messages.

PHPBB3-12493
[ticket/12493] Add functional test

Added a functional test.

PHPBB3-12493
Merge pull request #2421 from n-aleha/ticket/12493

[ticket/12493] Fix sql query for selection of users that have disabled PM

* n-aleha/ticket/12493:
  [ticket/12493] Add functional test
  [ticket/12493] Fix sql query for selection of users that have disabled PM
Merge branch 'develop-ascraeus' into develop

* develop-ascraeus:
  [ticket/12493] Add functional test
  [ticket/12493] Fix sql query for selection of users that have disabled PM