major refactoring, moving common functions outside of reference class
render examples as static html so that it is easy to test.
implement Polychart as an object of a more general rCharts class
refactor showOutput to work with different classes.
modify one example to check facet method