WICKET-5627 broadcastMessage(): hook to set more thread-local context before rendering components

(cherry picked from commit e877ae211673aaa093dac94cf20baf12a93a4150)