Updated spec and api docs to desired new format.
Merge branch 'develop' of github.com:matrix-org/synapse into registration-api-changes
Added LoginType constants. Created general structure for processing registrations.
Split out password/captcha/email logic.
Updated webclient to support the new registration logic.
Make captcha work again with the new registration logic.
Updated cmdclient to use new registration logic.
Fix unit tests.
Update spec to include m.login.email.identity
Merge branch 'develop' of github.com:matrix-org/synapse into registration-api-changes in preparation for re-merge to develop.