Initial refactor

Separate the Gallery code from the Reveal plugin to remove
dependency on Reveal.  Add a Makefile to build the plugin script from
the component parts.
Add tests
Merge branch 'refactor'