Correctly handle onevent properties

Right now, these properties are only set when using setAttribute. These commits make sure the properties are up-to-date after using setAttributeNode, removeAttribute or removeAttributeNode, too.