workflows: refactoring of holdingpen

* Implements caching for fast research sorting and else.

* Simplifies the code.

* Factorizes some code part.

Signed-off-by: Guillaume Lastecoueres <guillaume.lastecoueres@cern.ch>
Actually, what if we formalize the timing to be part of the interface? For example when you search and the processing is done, it prints next to the total records number `Showing 1 to 4 of 4 entries (0.26 seconds)`