Make the library thread-safe. DO NOT MERGE.

I noticed that, when using one smcp_t instance per thread, the library would crash when observing two resources at the same time using two threads.

Using smcp_get_current_instance() within the whole library is broken because it is sometimes returning NULL... I got rid of smcp_set_current_instance() and smcp_get_current_instance(), and modified a lot of prototypes, passing smcp_t instances all around. Crashes are gone!

However:
- Only the library has been modified. As a result, smcpd, smcpctl and other things are not compiling.
- Stack optimizations are now disabled. I propose to declare something like "extern const smcp_t self;" at the top of each file when SMCP_EMBEDDED is defined. A macro adding "const smcp_t self" as a first argument of each function needs to be defined too.

I don't have so much time to deal with that, so I'm just leaving this here so you can cherry-pick my work and build upon it ;)