union-1016578: Added union type and unit test

Added the union type and adjusted testTypes. The union type is implemented differently from firefox since it doesn't allow for arrow functions and the new promise library.

The require("promise") in testResource and testTypes needed to be adjusted since it would be undefined on firefox.