JavaScript Class System with Multiple Inheritance