dock: ensure the correct initial sequence of global variables

1. the variable "XU" must be created before creating ATOMS
2. currentViewport: it's better use lazy initialization, because
the value may be changed in the dock initial process and
the variable's initial process rely on the "XU".

Change-Id: I26fe5c0c2123503d28e284b8c2d007d6e40bcef0