Fixing semantic issue with Streams SQL builder.

The build_query() function accepted an array as a parameter but just used the class $sql variable instead. It should use the $sql variable, which it now does.

Also adding a proper reset_sql() function so we don't just reset it to a plain empty array.
Refining row parser join functionality.

This allows field types to do a join and add || as array delimiters. As an example, created_by has been baked into the row parser to be a join instead of a separate query.

This is on the edge of a new feature, but I consider the lack of advanced join functionality to be a bug more than anything, so I am counting it as a bug fix.

Closes #2179