Refactorize some of the mid$ code
Refactorize some of the mid$ code

A lot of the mid$ code was duplicated, so this commit refactorizes the
code using subtilis_exp_t* for str_len.  This allows us to have
one function that implements the checking for mid$ when either the
string or the second parameter are variables.

Signed-off-by: Mark Ryan <88ffc4093c40652fbbf052f026a8b6147509f0aa@gmail.com>

markdryan/subtilis,markdryan/subtilis