Both ldap or the DB can return information in a non-consistent
ordering leading to events to be generated in different order.
And current tests are, right now, assuming a given order.
Note this is a rare random, but it's happening, so better
fix it, see the issue for some more details.
So we just do the tests ordering immune, verifying that all the
expected events have been triggered and done. Irrespectively of their order.
With that provider we'll be explicitly covering that any
pagesize and subcontexts search is returning results consistently
so the internal paging/servercontrols work as expected.
The unit tests were failing because the upgrade step was missed.
In addition, there was a typo in a variable name, which meant that the
role was not actually synchronised.
This commit replace as much as possible of clean_param and PARAM_ usages related to user object.
Also few unit tests has been changed to match the new validation