MDL-43325 JavaScript: Set a default visibility for most Moodle dialogues

We used to ignore the 'visible' field in the initializer, but now we hide
dialogues if visible is false. This was an unintentional change from the
stable API and means that confirmation boxes, alerts, and exceptions are no
longer shown by default.