Data-api initialization fix for async scenario (#10851 fix)

$(window).on("load") changed to $(document).ready() for affix, carousel and scrollspy plugins.

Fixes #10851.