Make Netty buffer sizes configurable

Fixes #1503.