Carsten Pfeiffer first sorry for the delay in answering you on this one...
The bulk API would avoid avoid flooding the build queue with shelve tasks when there are many jobs to be discarded.
I'm not really convinced of the added value of what you suggest as the shelve plugin is using lightweight executors therefore it should not be an issue to send multiple items to the queue.
This would take care of resolving the minimum set of items to shelve (e.g. if a parent item shall be shelved, do not shelve the child items as well).
This part is interesting indeed, this would address one of the fear I had on the
JENKINS-27734 development. It would require quite some work though
I cannot currently commit on this development, happy to help/review if somebody want to take a shot at it. I'm not sure yet when I'll have enough bandwidth to work on this :/