Make sure that domReady(), when used as a function rather than a plugin, executes registered callbacks sequentially.    This is how ready() is supposed to work, so it makes sense for domReady() to follow suit.

Fixes #16389, refs #16386 on 1.7 branch.

(cherry picked from commit 33e4435e30d59f339af3bcce6d84fbc0aa3bd6c6)