Constify streams API and a few other calls down the rabbit hole.
(`char *` to `const char *` for parameters and few return values)
In a few places int len moved to size_t len.
Merge branch 'pull-request/399'