[core] combine duplicated getrlimit, network_init
[core] combine duplicated getrlimit, network_init

combine duplicated getrlimit, network_init code which was duplicated
and only slightly modified for root and non-root.

PatchyFog/lighttpd1.4-mbedtls,lighttpd/lighttpd1.4,gstrauss/lighttpd1.4,PatchyFog/lighttpd1.4-mbedtls,PatchyFog/lighttpd1.4-mbedtls,lighttpd/lighttpd1.4,PatchyFog/lighttpd1.4-mbedtls,lighttpd/lighttpd1.4,lighttpd/lighttpd1.4,lighttpd/lighttpd1.4,gstrauss/lighttpd1.4,gstrauss/lighttpd1.4,PatchyFog/lighttpd1.4-mbedtls,lighttpd/lighttpd1.4,gstrauss/lighttpd1.4,gstrauss/lighttpd1.4,gstrauss/lighttpd1.4,PatchyFog/lighttpd1.4-mbedtls,PatchyFog/lighttpd1.4-mbedtls