refactor config variables in middlewares

optimized load of the config files in proxyquery and objectquery
now both of them will load some vars from corresponding server config (proxy-server or object-server)
it should avoid duplicating vars for both middleware section and server section
also moved some variables between configs to load them only once