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.