Implement capability aware versions of some libc functions.

Functions are suffixed with _c so that new str*() functions are within
the reserved str* namespace.

The implementations are primairly based on C-preprocessor hacks and
allow the non-capability aware versions to be used with only small
modifications.  For this reason the implmentation resides in lib/libc.
Once clang is able to compile libc we will likely add them to libc.