Migrate code for checkbox demo to external file.

Make the ripple working when clicking on the component. Do not use the ripple directly.
Update all demos to use external JS so they could be compiled and inlined.