Improve/fix MF3 field handling

* Use input type `text` for numeric attributes with `needs_raw_value`.

  Otherwise, the browser silently drops values like "25 m".

* Don't set `require` for required attributes of an optional Id_Entity
  attribute

* Don't use `focus` to activate a entity selector dialog; use `click`
  and (most) `keypress` events, instead.

* Ignore input elements with class `.readonly` in Javascript.
Factor `form_attr_spec_d`