CMS-1671 Fixes for UserInfoPopup and ElementHelper

Regarding to CMS-1671. I looked throught Firefox error in UserInfoPopup. It occurres due second parameter of node.insertBefore() method is expected to be node or null but it has to be specified. In spite of this lib.d.ts defines second parameter as optional and allows to use insertBefore() with one parameter.

On the other hand ElementHelper.insertBefore() it is implemented wrong. If second parameter is null we will get exception trying to call getHTMLElement() of null. Also it's abit strange that ElementHelper.appendChild recieves HTMLElement while ElementHelper.inserBefore recieves api_dom.Element.

I did fix for UserInfoPopup considered to use ElementHelper.appendChild() there and I fixed ElementHelper.insertBefore() as well.
Merge pull request #251 from enonic/CMS-1671

CMS-1671 Fixes for UserInfoPopup and ElementHelper