Popup cleanup

Gets rid of regex-based theme manipulation and of the call to _setOptions from _create. Also, when moving this.element from its original location into the container, detach from original location, apply all the classes based on the options and only then append to container. This reduces the total number of reflows to two.