Toggle hyperlink active state via classes rather than custom XML attrs

Toggling a custom attribute on a custom XML element doesn't properly
update the visual state on some browsers (e.g., WebKit on OSX). Using
CSS classes instead seems to be better handled in these browsers,
correctly updating the mouse cursor icon on the fly.
Clean up API dox
Normalize keyboard events involving modifiers

Different browsers + platforms report when the modifier is activated
differently. Easiest way to cope with this is to manually normalize
these events.

Fixes issue #322.