Add json_string functions that accept a length

My company is using jansson, and we recently ran into a situation where we were converting strings that were not null terminated. We created a wrapper function that copies the string to a null terminated buffer and then passes it to `json_string()`, but it would be better if we didn't have to do the extra copy.

This patch adds `json_nstring()` and `json_nstring_nocheck()` that accepts a length and will only turn that much of the string into a json type.

Please let me know if there is anything missing in this pull request.