Check for the existance of composer.selection

Don't assume that composer.selection has been set when focusing. This
may not be a "real" fix but it prevents thing from breaking.
Replaces dangerous syntax with explicit undefineds.
Bugfix to ensure that when interpolating fields into the dialog that we pull the actual attributes from the element instead of using the shorthand dot-tag notation. The reason for this is that the shorthand notation may potentially store a different value (e.g. Consider the following attributes: "href", "disabled", "checked"). Proper method for retrieving the attribute is to use the native DOM "getAttribute" method.
Update rangy.