Change typedefs from void* to struct{}*, allowing C compiler to differentiate them.

This exposed many type mismatches (some benign) which are also fixed
in this patch.

This could cause some user code to fail compiling, for example if
handler argument types don't match perfectly.  (See changes to
example_server.c for example.)