Refactor ClientHooks::onBeforePageDisplayAddJsConfig

Change-Id: I4bbf589878884f62fb783539fb82c137d262b8b0