split netty into 2 modules (api and core)

Api module has minimal dependencies. Currently only the code for http handlers are in api module. Wrote a simple test case as well to make sure that these changes did not break anything.
The class HttpResourceHandler has many dependencies but it implements HttpHandler which does not have dependencies so that is why this function now returns an HttpHandler