Keep a counter for the amount of times pw_init() was called and only clear everything when pw_deinit() was called an equal amount of times. Also ensure that pw_init() can be called again after pw_deinit(). Fixes #2238
This is an autotools leftover, with meson we're always guaranteed to have the config.h file.