msgbuf: change skiplist to pma and add flush to background thread