Fix determining the namespace for complex elements.

Previously, the namespace was only looked up on the schema definition,
while ignoring namespaces defined on the `definitions` element.
Fixup the `elementFormDefault` functionality.

The default for `elementFormDefault` is `unqualified`, unless otherwise
specified. This means we need to treat `qualified` as a special value,
not the other way around.