Restructuring PICL IdP's client/example.js into a reusable library.

Forked from https://github.com/mozilla/picl-idp
Removing non-client code.
Haven't fixed up module imports, etc.