XXX libc: improve on the existing signal implementation

big work in progress, and may have to scrap and redo from start

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>