don't draw empty path collections

doing so causes a JavaScript error because "vertices is undefined".
add a test for empty line collections

test creates a figure with an empty line collection, which should be invalid but
is a reasonable accident to make and handle. It then ensures that a collection
with zero paths is not JSON serialised, because this would cause the JavaScript
to fail.
Merge pull request #211 from njwilson23/empty-collections

don't draw empty path collections