[JS] save up some memory by moving the classes array to be constant. take the class prototype member out of it as it is set at runtime