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.