add virtual destructor to AbstractValue
replace plain old pointer by unique_ptr
remove comment
move Events into extra namespace