Fix substring and push string operation up to RelationalDriver

The substring bug was that the start and end positions were passed to the sql function, but that takes start position and length instead.

superseeds #856 . fixes substring bug introduced by #843 .

review by @szeiger @dimitrkovalsky