Add support to create window of different shell types.

Currently, we always hardcode the window to be of TopLevel type.
This patch makes changes so that the display doesn't assume anything
and it's left to the caller to explicitly define the shell type of
window.
Update comments.