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.
This change is unnecessary.