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>
Here you can just say 
```
table_data['aaData'].append(row)
```