removes n+1 query for custom_values on wp#index
move some controller logic into a decorator

This is by no means clean yet, but better than it was before.
eager loading of required columns - too many for now
only load required columns
remove unnecessary block
shortens sorting
moves custom field detection to own method
refactor column handling into own method
moves methods into module
code harmonization
improve handling of desired columns
Merge pull request #2265 from opf/fix/work_package_index_performance