Return the actual element that got focus

Instead of returning the <a> element, return the child that got
the focus. Also add support for getting the focus of an <use>
element.
Add support for the focus attributes

Also fix a leak on the last string of the event attributes