libfreerdp-core: fix potential asynchronous queuing memory problems for primary drawing orders