abstracted construction of interactive code cell widgets so that new types can be easily added, including by extensions