Ahaggar: add more utilities functions

* substring_strndup() to allocate and copy a string from substring
* More substring_addchr_*() and substring_minuschr_*()

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Ahaggar: define the substring_strndup() function

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>