Do not execute dojo/on until DOM is ready

This ensures that the focusin/out feature detection operates
properly even when people do not follow best practices and put
their code in the <head> instead of before </body>.

Refs #17599.

(cherry picked from commit 08187b88273f09326e5ebc8ea03eecd592e7eaca)
(cherry picked from commit 31aab4cc1bb93592d1cb6a3c4e34f612f36d525a)

Conflicts:
	on.js