Fix performance regression

When opening the `resource allocation modal window` (double-click on a
task), the advanced search was calculating the load of the resources
when it should do it when clicking advanced search button. This leads
to a big delay when opening the `resource allocation modal window` if
there is a moderate amount of data.

Now these calculations are only done when clicking advanced search
button and the `resource allocation modal window` is opened almost
instantly.
Declare transaction declaratively

Use @Transactional attribute instead of opening transaction manually.
Performance improvement

When calculating the load ratio of each resource, a new transaction is
being created for each one. Now one transaction is reused for
everyone, which gives a good performance boost when loading the
`Advanced search`.
Improve test to avoid spurious errors
Improve test

It was dependant on the order of the base calendars returned. This
caused spurious errors.