Pzhang/texteditor password

Hmm, I don't think we should alter the value to which we set *this.constraints*, since then `editor.setConstraints(value); value == editor.getConstraints()` might return `false` when it should return `true`.

Also, the [constraints documentation](https://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/lcdui/TextField.html#constraints) distinguishes between *restrictive constraints* (a.k.a. "modes"), which are mutually exclusive, and *modifier flags*, which aren't; but the *type* parameter to *createEditor* treats *TYPE_ANY* and *TYPE_PASSWORD* as mutually exclusive, which is confusing.

So here I would distinguish between the *constraints* provided by the caller, which we should preserve in the format specified by J2ME, and the editor *type*, which we derive from *constraints* but only use internally, to determine the kind of HTML element to create.

I.e. something like this:

```
var TYPE_TEXTAREA = "textarea";
var TYPE_PASSWORD = "password";

// https://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/lcdui/TextField.html#constraints
var CONSTRAINT_ANY = 0;
var CONSTRAINT_PASSWORD = 0x10000;

if (constraints == CONSTRAINT_ANY) {
  type = TYPE_TEXTAREA;
} else if (constraints == CONSTRAINT_ANY | CONSTRAINT_PASSWORD) {
  type = TYPE_PASSWORD;
} else {
  console.warn("Constraints " + constraints + " not supported.");

  if (constraints & CONSTRAINT_PASSWORD) {
    // Special case: use the PASSWORD type if there's a PASSWORD constraint,
    // even though the mode isn't ANY.
    type = TYPE_PASSWORD;
  } else {
    // Fall back to the default value.
    type = TYPE_TEXTAREA;
  }
}
```