lib: create directories for some lib (in order to prepare examples)

Signed-off-by: Jean Privat <jean@pryen.org>
lib: move some examples/* into specific subdirectories of their lib

examples/ starts to become a mess.
So move the simple examples of lib into an `example` subdirectory of the lib.

Signed-off-by: Jean Privat <jean@pryen.org>