add string functions

Review after #164.

String functions:
* [x] add `substr(str, begin, end)` function, which will give subtring of `str` from  index `begin` (inclusive) to index `end` (exclusive)
* [x] add `len(str)` function, which will return the length of a string.
* [x] add `tail(str, length)` function, which will return substring of `str` from its head with length `length`. If `len(str) < length`, it will return a copy of itself.
* [x] add `head(str, length) ` function, which will return substring of `str` at its end with length `length`. If `len(str) < length`, it will return a copy of itself.

Changes on RACO:
* [x] implement NaryFunction.