changed how self.value is handled

all internal functions use get/set_value() and sharp divide between
continuous and discrete nodes. Discrete nodes have a valueindex
attribute which is set by set_valueindex() (itself called by
set_value()) and can be accessed by get_valueindex()