Fix building Haiku from Haiku

* Always include cdefs.h to have __[BEGIN|END]_DECLS defined.
  Somehow, this didn't affect cross-build, but it made building
  from Haiku fail.
Move libroot synchronization functions to private namespace

* Prefix lock functions with __ to mark them as private. Add
  forwarding macros to keep existing code working.

* Avoids symbol name clashes with kernel lock APIs, occuring when
  using kernellandemu-lib in userlandfs. Thanks to Ingo for the
  suggestion.