Allow JSONReader to copyTo a writer

Also, fix for JSONWriter to skip empty iterations