Ajax Lost/Restore password

Resubmit of https://github.com/owncloud/core/pull/4197 which is hardly mergeable with current master.

I ported the code, styling from that PR needs reviewing as I'm unsure if it's still needed for master.

@jancborchardt feel free to bring more beauty here