Add support for substring function

See http://www.w3.org/TR/xpath/#function-substring
Merge pull request #51 from Ajedi32/substring_function

Add support for substring function