libfreerdp-core: transport refactoring