omit attributes that are logically false

HTML attributes that have a value are considered logically true, even if the
value is the empty string.  The prior code translates an element like
[:option {:selected false} ...] to <option selected="false">, which the
browser interprets as true.

Omitting the attribute altogether if the value is logically false
(i.e. false or nil) fixes this.
move check for attr value to all cases