Make ErrorEvent::new take cancelable and bubbling enums
auto merge of #4372 : thiagopnts/servo/errorevent, r=Ms2ger

Fixes #4174.