new helper function 'xnmalloc'

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>