html: Retain untranslated attributes

Without this change, the values of untranslated attributes were silently dropped.
html: Added a test for untranslated attributes
html: improve code readability

Lets make that logic readable by mere mortals.
mozlang: don't determine state by direct inspection

Use istranslated() and friends rather then target == "".  This was
causing some pot2po errors due to Unicode encoding issues.