unrar cleanup for MinGW
plugin_test cleanup for MinGW

- no longer fails to build if <err.h> is not available
- only references `lib' pointer if HAVE_DLOPEN since it's defined within a
  HAVE_DLOPEN block
rar cleanup for MinGW
Merge remote-tracking branch 'bundle/master'