added collection/closure support to StreamingJsonBuilder.
removed some duplication.
improved readability.
removed some duplication.