xrdp-ng: start implementing reusable protocol helpers