Refactor template.js into a class.

Note that this renames template.js to Template.js, which may cause some confusion
on case insensitive filesystems.
Defer setting non-boilerplate template node values until widget properties are available.

For example, for a template like <button type=button class={{myClass}}>{{myLabel}}</button>,
"type" will be set in buildRendering() but "class" and the the label won't be set until refreshRendering().
This is regardless of whether or not the app overrides the default values for myClass and myLabel.

Avoids errors referencing nested properties (ex: item.foo.bar) when item.foo isn't defined
yet when buildRendering() runs.

Will probably require some updates to deliteful test files (and possibly code) which assumes
that the default values are filled in by the time buildRendering() completes.

Fixes ibm-js/deliteful#249.
Rearchitect how class={{xyz}} is handled in templates,
and also how class is handled when specified for programmatic creation
like new MyWidget({className: "foo"}).

On the first refreshRendering(), it will add this.xyz to the specified
node's class list, rather than overwriting its class list completely.
Further, if the user changes the value of xyz from "foo" to "bar",
it will do a removeClass("foo") and addClass("bar"), rather than just
setting the class attribute directly.

Solves the problem with baseClass and d-rtl getting overwritten,
and also the problem with user defined classes getting overwritten.

Adds setClassComponent() method to Widget to set part of a class string
without interfering with the other parts.

Also moves setting baseClass and d-rtl classes from Widget#attachedCallback()
to Widget#refreshRendering().

Fixes #263 etc.

PS: If we later decide that this behavior is too magical, we can enable it through a different
attribute name, for example:  append-class={{xyz}}.
Rewrite HasDropDown code to use promises, and also to eliminate race conditions
between mouseup/keyup vs. when the popup completes loading.