URI processing code moved to a separate function.

This allows to reuse it in the upcoming SPDY module.
Win32: disabled MSVC warning about '\0' not fitting into array.

We believe that this warning produces more inconvience than real benefit.
Here is an example to trigger:

  u_char a[4] = "test";
Preliminary experimental support for SPDY draft 2.
Core: fixed resource leak if binary upgrade fails due to no memory.

Found by Coverity (CID 992320).