attr() should return undefined or name for booleans

jquery behaviour is to return the attrribute name when present

    $('<input name=email autofocus>').attr('autofocus')  => "autofocus"
    $('<input name=email>').attr('autofocus') => undefined

this PR changes the attr/removeAttr behaviour to match.