Helper for creating easily extensible and subclassable JavaScript Error classes.