Allow cores to be attached to primitive state

Previously cores assumed the thing they were managing was an immutable
object, allow them to manage primitive values as well
Rename attachCore to defineState and computed to defineComputed
Bump to 0.4.0-rc4