Changed dlopen to use RTLD_DEEPBIND where available

- Fixes bugreport:7680
  http://hercules.ws/board/tracker/issue-7680-hpm-is-broken/

Signed-off-by: Haru <haru@dotalux.com>
Fixed several packet errors with pre-renewal clients from 2006-2008

Thanks to Beret for reporting the issues, Ind for his great help with
research, suggestions and the necessary tools to fix this.

Signed-off-by: Haru <haru@dotalux.com>
Corrected some MSVC warnings with old (<2009) packetvers

Follow-up to df0a324, thanks to Beret

Signed-off-by: Haru <haru@dotalux.com>
Merge branch 'master' of https://github.com/HerculesWS/Hercules into ghbb