Added case StatementRef for conversion from jObject to StatementBase
Added case SubStatement for conversion from jObject to StatementBase, checking for nested SubStatements
Adjust SubStatement object handling in Statement/StatementBase

* Add unit test for detecting non-null SubStatement as Statement object