Make number of functions in a plugin a static variable

Shouldn't be accessed from the outside.
Compile the library with -Werror and -Wextra and remove detected issues
Store plugins' handles instead of just state flags

Handles will be needed to close/reload plugins.

Also give load_*_plugin_from_plugin functions' return type more noble name
'gpointer' instead of 'void *'.