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.
Revert "Do not execute dojo/on until DOM is ready"

This reverts commit 08187b88273f09326e5ebc8ea03eecd592e7eaca.
Squashed commit of the following:

commit 1b98041b2cf044bab7889dea5f9c809f94678c7c
Author: Clément Mathieu <clement.mathieu@outlook.com>
Date:   Thu Jan 30 13:25:11 2014 +0100

    add unit tests

commit 62d2d97ecbc81ced0b56c7ed1608d1213a0701b9
Author: Clément Mathieu <clement.mathieu@outlook.com>
Date:   Wed Jan 29 19:32:33 2014 +0100

    fix regression introduced by #17155